home *** CD-ROM | disk | FTP | other *** search
Text File | 2004-08-03 | 3.5 MB | 113,359 lines |
Text Truncated. Only the first 1MB is shown below. Download the file for the complete contents.
- diff -urNEBb binutils-2.14-orig/bfd/ChangeLog-9697 binutils-2.14/bfd/ChangeLog-9697
- --- binutils-2.14-orig/bfd/ChangeLog-9697 2001-03-08 22:03:56.000000000 +0100
- +++ binutils-2.14/bfd/ChangeLog-9697 2003-12-02 14:09:39.000000000 +0100
- @@ -49,6 +49,13 @@
- * config.bfd (i[3456]86*-go32-rtems*): Fix to be the same as
- i[3456]86-go32.
-
- +Fri Dec 19 14:25:58 1997 Daniel Verite <daniel@brainstorm.fr>
- +
- + * amigaos.c (amiga_bfd_copy_private_section_data): Add return
- + value.
- + * amigaoslink.c (amiga_final_link): Update linker_mark fields for
- + input sections involved in the output.
- +
- Thu Dec 18 16:01:25 1997 Doug Evans <devans@canuck.cygnus.com>
-
- * configure: Regenerate to get @SHELL@ substituted.
- @@ -597,6 +604,16 @@
- (assign_file_positions_for_segments): Increment the file offset
- for a section with contents, even if it is not loadable.
-
- +Tue Sep 23 09:46:10 1997 Fred Fish <fnf@ninemoons.com>
- +
- + * amigaos.c (alloca): Only declare if not defined as macro.
- +
- +Mon Sep 22 10:15:30 1997 Fred Fish <fnf@ninemoons.com>
- +
- + * amigaos.c (sysdep.h): Relocate include to provided needed
- + <sys/types.h> file.
- + * amigaoslink.c (sysdep.h): Ditto, and remove <sys/types.h>.
- +
- Sun Sep 21 11:03:24 1997 Nick Clifton <nickc@cygnus.com>
-
- * elf32-v850.c (v850_elf_final_link_relocate): Add return code
- @@ -767,6 +784,12 @@
- * Makefile.in: Rebuild.
- * doc/Makefile.in: Rebuild.
-
- +Mon Aug 25 16:32:00 1997 Steffen Opel <opel@rumms.uni-mannheim.de>
- +
- + * Makefile.in (guide, install-guide, clean-guide, bfd.guide):
- + New targets for AmigaGuide documentation.
- + (install): Add install-info and install-guide.
- +
- Mon Aug 25 16:14:34 1997 Christopher Provenzano <proven@cygnus.com>
-
- * configure: Rebuild with latest devo autoconf for NT support
- @@ -3767,6 +3790,12 @@
- (ihex_write_object_contents): Remove extbase; always use segbase
- instead.
-
- +Thu Aug 29 17:53:51 1996 Daniel Verite <daniel@brainstorm.eu.org>
- +
- + * amigaos.c (amiga_get_section_contents): Handle sections that
- + are larger than their disksize.
- + (amiga_make_unique_section): Remove infinite loop.
- +
- Thu Aug 29 16:52:17 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
- @@ -3992,6 +4021,13 @@
- check dynsec when deciding whether to start a new segment for a
- writeable section; -N will now handle this.
-
- +Sun Aug 4 22:15:56 1996 Fred Fish <fnf@ninemoons.com>
- +
- + * amigaoslink.c (sys/types.h): Include before genlink.h to get
- + definition for size_t which is used in genlink.h. This was not
- + getting defined during a cross compilation on alpha-dec-osf2.0 for
- + some reason.
- +
- Thu Aug 1 22:43:08 1996 Jeffrey A Law (law@cygnus.com)
-
- * libhppa.h: Remove "esel" changes. Not the right approach.
- @@ -4088,6 +4124,11 @@
- * configure.in: Fix test for whether a compiler has a 64 bit
- type. From Jim Wilson <wilson@cygnus.com>.
-
- +Thu Jul 18 16:58:11 1996 Daniel Verite <daniel@brainstorm.eu.org>
- +
- + * amigaoslink.c (aout_perform_reloc): Fix baserel 16 bits relocs.
- + (my_add_to): Fix sign bug in extraction of 16 bits values.
- +
- Thu Jul 18 15:39:10 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.host (mips-sgi-irix6*): New host.
- @@ -4217,6 +4258,11 @@
- (mips_relocate_section): Permit an arbitrary number of REFHI or
- RELHI relocs before the associated REFLO or RELLO reloc.
-
- +Sun Jul 7 12:15:39 1996 Kamil Iskra <iskra@student.uci.agh.edu.pl>
- +
- + * amigaos.c (amiga_write_symbols): Fix Daniel's workaround for
- + outputting long symbol names.
- +
- Fri Jul 5 19:27:49 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * aout-target.h (MY(callback)): Set reloc_count fields.
- @@ -4296,6 +4342,11 @@
- (elf64_alpha_adjust_dynamic_symbol): If a symbol has its address
- taken, we cannot generate a .plt entry for the symbol.
-
- +Thu Jun 27 17:35:32 1996 Daniel Verite <daniel@brainstorm.eu.org>
- +
- + * amigaos.c (amiga_write_object_contents): Don't output symbols
- + which are not attached to any section, such as indirect symbols.
- +
- Thu Jun 27 11:24:29 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Add AC_ISC_POSIX, and check for setitimer and
- @@ -4525,6 +4576,19 @@
- common symbol defined by the linker. Don't export function code
- even if export_defineds is set.
-
- +Tue Jun 11 12:52:10 1996 Daniel Verite <daniel@brainstorm.eu.org>
- +
- + * amigaoslink.c (mygeta4): Function removed.
- + (amiga_final_link): Search for ___a4_init symbol in the global hash
- + table and cache its value in the backend data.
- +
- + * amigaos.c (write_longs): Return a boolean instead of the
- + number of longs written.
- + (write_section_contents): Split reloc hunks at 0xffff entries.
- + (amiga_write_symbols): Cut the names in hunk symbols at 124 characters
- + (workaround for an amigaos bug).
- + (amiga_handle_rest): Added a sanity check in reloc hunks parsing.
- +
- Mon Jun 10 11:57:27 1996 Jeffrey A Law (law@cygnus.com)
-
- * coff-h8300.c (howto_table): Add new entries for R_BCC_INV
- diff -urNEBb binutils-2.14-orig/bfd/ChangeLog-9899 binutils-2.14/bfd/ChangeLog-9899
- --- binutils-2.14-orig/bfd/ChangeLog-9899 2001-03-08 22:03:56.000000000 +0100
- +++ binutils-2.14/bfd/ChangeLog-9899 2003-12-02 14:09:39.000000000 +0100
- @@ -5573,6 +5573,11 @@
-
- * cpu-sh.c (arch_info_struct): Correct next field of sh3e.
-
- +Sun Jan 18 10:39:52 1998 Daniel Verite <daniel@brainstorm.fr>
- +
- + * amigaos.c (CAN_WRITE_OUTSYM): New macro.
- + (amiga_write_object_contents): Use CAN_WRITE_OUTSYM
- +
- Wed Jan 14 17:23:27 1998 Nick Clifton <nickc@cygnus.com>
-
- * elf32-m32r.c: Add macros to handle NOP insertion.
- diff -urNEBb binutils-2.14-orig/bfd/Makefile.am binutils-2.14/bfd/Makefile.am
- --- binutils-2.14-orig/bfd/Makefile.am 2003-04-21 14:24:18.000000000 +0200
- +++ binutils-2.14/bfd/Makefile.am 2003-12-02 14:09:39.000000000 +0100
- @@ -162,7 +162,10 @@
- # The .o files needed by all of the 32 bit vectors that are configured into
- # target_vector in targets.c if configured with --enable-targets=all.
- BFD32_BACKENDS = \
- + amigaos.lo \
- + amigaoslink.lo \
- aout-adobe.lo \
- + aout-amiga.lo \
- aout-arm.lo \
- aout-cris.lo \
- aout-ns32k.lo \
- @@ -211,6 +214,7 @@
- elf32-arc.lo \
- elfarm-oabi.lo \
- elfarm-nabi.lo \
- + elf32-amiga.lo \
- elf32-avr.lo \
- elf32-cris.lo \
- elf32-d10v.lo \
- @@ -237,6 +241,7 @@
- elf-m10200.lo \
- elf-m10300.lo \
- elf32-mcore.lo \
- + elf32-morphos.lo \
- elfxx-mips.lo \
- elf32-mips.lo \
- elf32-msp430.lo \
- @@ -326,7 +331,10 @@
- xtensa-modules.lo
-
- BFD32_BACKENDS_CFILES = \
- + amigaos.c \
- + amigaoslink.c \
- aout-adobe.c \
- + aout-amiga.c \
- aout-arm.c \
- aout-cris.c \
- aout-ns32k.c \
- @@ -375,6 +383,7 @@
- elf32-arc.c \
- elfarm-oabi.c \
- elfarm-nabi.c \
- + elf32-amiga.c \
- elf32-avr.c \
- elf32-cris.c \
- elf32-d10v.c \
- @@ -400,6 +409,7 @@
- elf-m10200.c \
- elf-m10300.c \
- elf32-mcore.c \
- + elf32-morphos.lo \
- elfxx-mips.c \
- elf32-mips.c \
- elf32-msp430.c \
- @@ -587,7 +597,7 @@
- aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
- elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h \
- elf64-hppa.h elfcode.h elfcore.h elflink.h \
- - freebsd.h genlink.h go32stub.h \
- + freebsd.h genlink.h go32stub.h libamiga.h \
- libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \
- libnlm.h liboasys.h libpei.h libxcoff.h mach-o.h \
- netbsd.h nlm-target.h nlmcode.h nlmswap.h ns32k.h \
- @@ -969,6 +979,9 @@
- cpu-xstormy16.lo: cpu-xstormy16.c $(INCDIR)/filenames.h
- cpu-xtensa.lo: cpu-xtensa.c $(INCDIR)/filenames.h
- cpu-z8k.lo: cpu-z8k.c $(INCDIR)/filenames.h
- +amigaos.lo: amigaos.c libamiga.h bfd.h
- +amigaoslink.lo: bfd.h libamiga.h amigaoslink.c
- +aout-amiga.lo: aout-amiga.c aoutf1.h bfd.h
- aout-adobe.lo: aout-adobe.c $(INCDIR)/filenames.h $(INCDIR)/aout/adobe.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h \
- $(INCDIR)/bfdlink.h
- @@ -1122,6 +1135,10 @@
- elf.lo: elf.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/libiberty.h
- +elf32-amiga.lo: elf32-amiga.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- + $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
- + elf32-target.h
- elf32-arc.lo: elf32-arc.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h \
- @@ -1181,6 +1198,10 @@
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
- +elf32-i386-amithlon.lo: elf32-i386-amithlon.c elf32-i386.c $(INCDIR)/filenames.h \
- + $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \
- + $(INCDIR)/elf/reloc-macros.h elf32-target.h
- elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h \
- @@ -1262,6 +1283,10 @@
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
- +elf32-morphos.lo: elf32-morphos.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- + $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
- + elf32-target.h
- elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
- diff -urNEBb binutils-2.14-orig/bfd/Makefile.in binutils-2.14/bfd/Makefile.in
- --- binutils-2.14-orig/bfd/Makefile.in 2003-05-02 18:06:14.000000000 +0200
- +++ binutils-2.14/bfd/Makefile.in 2003-12-02 14:09:39.000000000 +0100
- @@ -1,6 +1,8 @@
- -# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
- +# Makefile.in generated by automake 1.7.4 from Makefile.am.
- +# @configure_input@
-
- -# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
- +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- +# Free Software Foundation, Inc.
- # This Makefile.in is free software; the Free Software Foundation
- # gives unlimited permission to copy and/or distribute it,
- # with or without modifications, as long as this notice is preserved.
- @@ -10,30 +12,11 @@
- # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- # PARTICULAR PURPOSE.
-
- -
- -SHELL = @SHELL@
- +@SET_MAKE@
-
- srcdir = @srcdir@
- top_srcdir = @top_srcdir@
- VPATH = @srcdir@
- -prefix = @prefix@
- -exec_prefix = @exec_prefix@
- -
- -bindir = @bindir@
- -sbindir = @sbindir@
- -libexecdir = @libexecdir@
- -datadir = @datadir@
- -sysconfdir = @sysconfdir@
- -sharedstatedir = @sharedstatedir@
- -localstatedir = @localstatedir@
- -libdir = @libdir@
- -infodir = @infodir@
- -mandir = @mandir@
- -includedir = @includedir@
- -oldincludedir = /usr/include
- -
- -DESTDIR =
- -
- pkgdatadir = $(datadir)/@PACKAGE@
- pkglibdir = $(libdir)/@PACKAGE@
- pkgincludedir = $(includedir)/@PACKAGE@
- @@ -37,34 +20,34 @@
- pkgdatadir = $(datadir)/@PACKAGE@
- pkglibdir = $(libdir)/@PACKAGE@
- pkgincludedir = $(includedir)/@PACKAGE@
- -
- top_builddir = .
-
- -ACLOCAL = @ACLOCAL@
- -AUTOCONF = @AUTOCONF@
- -AUTOMAKE = @AUTOMAKE@
- -AUTOHEADER = @AUTOHEADER@
- -
- +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
- INSTALL = @INSTALL@
- -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
- -INSTALL_DATA = @INSTALL_DATA@
- -INSTALL_SCRIPT = @INSTALL_SCRIPT@
- -transform = @program_transform_name@
- -
- +install_sh_DATA = $(install_sh) -c -m 644
- +install_sh_PROGRAM = $(install_sh) -c
- +install_sh_SCRIPT = $(install_sh) -c
- +INSTALL_HEADER = $(INSTALL_DATA)
- +transform = $(program_transform_name)
- NORMAL_INSTALL = :
- PRE_INSTALL = :
- POST_INSTALL = :
- NORMAL_UNINSTALL = :
- PRE_UNINSTALL = :
- POST_UNINSTALL = :
- -build_alias = @build_alias@
- build_triplet = @build@
- -host_alias = @host_alias@
- host_triplet = @host@
- -target_alias = @target_alias@
- target_triplet = @target@
- +ACLOCAL = @ACLOCAL@
- +ALLOCA = @ALLOCA@
- +AMDEP_FALSE = @AMDEP_FALSE@
- +AMDEP_TRUE = @AMDEP_TRUE@
- +AMTAR = @AMTAR@
- AR = @AR@
- -AS = @AS@
- +AUTOCONF = @AUTOCONF@
- +AUTOHEADER = @AUTOHEADER@
- +AUTOMAKE = @AUTOMAKE@
- +AWK = @AWK@
- BFD_HOST_64BIT_LONG = @BFD_HOST_64BIT_LONG@
- BFD_HOST_64_BIT = @BFD_HOST_64_BIT@
- BFD_HOST_64_BIT_DEFINED = @BFD_HOST_64_BIT_DEFINED@
- @@ -72,54 +55,120 @@
- CATALOGS = @CATALOGS@
- CATOBJEXT = @CATOBJEXT@
- CC = @CC@
- +CCDEPMODE = @CCDEPMODE@
- CC_FOR_BUILD = @CC_FOR_BUILD@
- +CFLAGS = @CFLAGS@
- COREFILE = @COREFILE@
- COREFLAG = @COREFLAG@
- -CXX = @CXX@
- -CXXCPP = @CXXCPP@
- +CPP = @CPP@
- +CPPFLAGS = @CPPFLAGS@
- DATADIRNAME = @DATADIRNAME@
- -DLLTOOL = @DLLTOOL@
- +DEFS = @DEFS@
- +DEPDIR = @DEPDIR@
- +ECHO_C = @ECHO_C@
- +ECHO_N = @ECHO_N@
- +ECHO_T = @ECHO_T@
- +EGREP = @EGREP@
- EXEEXT = @EXEEXT@
- EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
- -GCJ = @GCJ@
- -GCJFLAGS = @GCJFLAGS@
- GMOFILES = @GMOFILES@
- GMSGFMT = @GMSGFMT@
- GT_NO = @GT_NO@
- GT_YES = @GT_YES@
- HDEFINES = @HDEFINES@
- INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
- +INSTALL_DATA = @INSTALL_DATA@
- +INSTALL_LIBBFD_FALSE = @INSTALL_LIBBFD_FALSE@
- +INSTALL_LIBBFD_TRUE = @INSTALL_LIBBFD_TRUE@
- +INSTALL_PROGRAM = @INSTALL_PROGRAM@
- +INSTALL_SCRIPT = @INSTALL_SCRIPT@
- +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
- INSTOBJEXT = @INSTOBJEXT@
- INTLDEPS = @INTLDEPS@
- INTLLIBS = @INTLLIBS@
- INTLOBJS = @INTLOBJS@
- +LDFLAGS = @LDFLAGS@
- +LIBOBJS = @LIBOBJS@
- +LIBS = @LIBS@
- LIBTOOL = @LIBTOOL@
- LN_S = @LN_S@
- +LTLIBOBJS = @LTLIBOBJS@
- MAINT = @MAINT@
- +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
- +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
- MAKEINFO = @MAKEINFO@
- MKINSTALLDIRS = @MKINSTALLDIRS@
- MSGFMT = @MSGFMT@
- -OBJDUMP = @OBJDUMP@
- OBJEXT = @OBJEXT@
- PACKAGE = @PACKAGE@
- +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
- +PACKAGE_NAME = @PACKAGE_NAME@
- +PACKAGE_STRING = @PACKAGE_STRING@
- +PACKAGE_TARNAME = @PACKAGE_TARNAME@
- +PACKAGE_VERSION = @PACKAGE_VERSION@
- +PATH_SEPARATOR = @PATH_SEPARATOR@
- POFILES = @POFILES@
- POSUB = @POSUB@
- RANLIB = @RANLIB@
- +SET_MAKE = @SET_MAKE@
- +SHELL = @SHELL@
- STRIP = @STRIP@
- TDEFINES = @TDEFINES@
- USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
- USE_NLS = @USE_NLS@
- VERSION = @VERSION@
- +
- +WARN_CFLAGS = @WARN_CFLAGS@
- WIN32LDFLAGS = @WIN32LDFLAGS@
- WIN32LIBADD = @WIN32LIBADD@
- +XGETTEXT = @XGETTEXT@
- +ac_ct_AR = @ac_ct_AR@
- +ac_ct_CC = @ac_ct_CC@
- +ac_ct_RANLIB = @ac_ct_RANLIB@
- +ac_ct_STRIP = @ac_ct_STRIP@
- all_backends = @all_backends@
- +am__include = @am__include@
- +am__quote = @am__quote@
- bfd_backends = @bfd_backends@
- bfd_default_target_size = @bfd_default_target_size@
- bfd_libs = @bfd_libs@
- bfd_machines = @bfd_machines@
- bfd_version = @bfd_version@
- bfd_version_string = @bfd_version_string@
- +bfdincludedir = @bfdincludedir@
- +bfdlibdir = @bfdlibdir@
- +bindir = @bindir@
- +build = @build@
- +build_alias = @build_alias@
- +build_cpu = @build_cpu@
- +build_os = @build_os@
- +build_vendor = @build_vendor@
- +datadir = @datadir@
- +exec_prefix = @exec_prefix@
- +host = @host@
- +host_alias = @host_alias@
- +host_cpu = @host_cpu@
- +host_os = @host_os@
- +host_vendor = @host_vendor@
- +includedir = @includedir@
- +infodir = @infodir@
- +install_sh = @install_sh@
- l = @l@
- +libdir = @libdir@
- +libexecdir = @libexecdir@
- +localstatedir = @localstatedir@
- +mandir = @mandir@
- +oldincludedir = @oldincludedir@
- +prefix = @prefix@
- +program_transform_name = @program_transform_name@
- +sbindir = @sbindir@
- +sharedstatedir = @sharedstatedir@
- +sysconfdir = @sysconfdir@
- +target = @target@
- +target_alias = @target_alias@
- +target_cpu = @target_cpu@
- +target_os = @target_os@
- +target_vendor = @target_vendor@
- tdefaults = @tdefaults@
- wordsize = @wordsize@
-
- @@ -132,12 +181,8 @@
- SUBDIRS = doc po
-
- docdir = doc
- -bfdlibdir = @bfdlibdir@
- -bfdincludedir = @bfdincludedir@
-
- bfdlib_LTLIBRARIES = libbfd.la
- -
- -WARN_CFLAGS = @WARN_CFLAGS@
- AM_CFLAGS = $(WARN_CFLAGS)
-
- # bfd.h goes here, for now
- @@ -289,7 +334,10 @@
- # The .o files needed by all of the 32 bit vectors that are configured into
- # target_vector in targets.c if configured with --enable-targets=all.
- BFD32_BACKENDS = \
- + amigaos.lo \
- + amigaoslink.lo \
- aout-adobe.lo \
- + aout-amiga.lo \
- aout-arm.lo \
- aout-cris.lo \
- aout-ns32k.lo \
- @@ -338,6 +386,7 @@
- elf32-arc.lo \
- elfarm-oabi.lo \
- elfarm-nabi.lo \
- + elf32-amiga.lo \
- elf32-avr.lo \
- elf32-cris.lo \
- elf32-d10v.lo \
- @@ -364,6 +413,7 @@
- elf-m10200.lo \
- elf-m10300.lo \
- elf32-mcore.lo \
- + elf32-morphos.lo \
- elfxx-mips.lo \
- elf32-mips.lo \
- elf32-msp430.lo \
- @@ -454,7 +504,10 @@
-
-
- BFD32_BACKENDS_CFILES = \
- + amigaos.c \
- + amigaoslink.c \
- aout-adobe.c \
- + aout-amiga.c \
- aout-arm.c \
- aout-cris.c \
- aout-ns32k.c \
- @@ -503,6 +556,7 @@
- elf32-arc.c \
- elfarm-oabi.c \
- elfarm-nabi.c \
- + elf32-amiga.c \
- elf32-avr.c \
- elf32-cris.c \
- elf32-d10v.c \
- @@ -528,6 +582,7 @@
- elf-m10200.c \
- elf-m10300.c \
- elf32-mcore.c \
- + elf32-morphos.lo \
- elfxx-mips.c \
- elf32-mips.c \
- elf32-msp430.c \
- @@ -721,7 +776,7 @@
- aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
- elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h \
- elf64-hppa.h elfcode.h elfcore.h elflink.h \
- - freebsd.h genlink.h go32stub.h \
- + freebsd.h genlink.h go32stub.h libamiga.h \
- libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \
- libnlm.h liboasys.h libpei.h libxcoff.h mach-o.h \
- netbsd.h nlm-target.h nlmcode.h nlmswap.h ns32k.h \
- @@ -777,132 +832,119 @@
-
-
- DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES)
- +subdir = .
- ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
- mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
- CONFIG_HEADER = config.h
- -CONFIG_CLEAN_FILES = bfd-in3.h bfdver.h
- +CONFIG_CLEAN_FILES = bfd-in3.h bfdver.h po/Makefile.in
- LIBRARIES = $(noinst_LIBRARIES)
-
- -
- -DEFS = @DEFS@ -I. -I$(srcdir) -I.
- -CPPFLAGS = @CPPFLAGS@
- -LDFLAGS = @LDFLAGS@
- -LIBS = @LIBS@
- +libbfd_a_AR = $(AR) cru
- libbfd_a_LIBADD =
- -libbfd_a_OBJECTS =
- +am_libbfd_a_OBJECTS =
- +libbfd_a_OBJECTS = $(am_libbfd_a_OBJECTS)
- LTLIBRARIES = $(bfdlib_LTLIBRARIES)
-
- -libbfd_la_OBJECTS = archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo \
- -cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo \
- -reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo \
- -binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo \
- -simple.lo archive64.lo
- -CFLAGS = @CFLAGS@
- -COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
- -LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
- +am__objects_1 = archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo \
- + cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo \
- + opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo \
- + linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo \
- + stab-syms.lo merge.lo dwarf2.lo simple.lo
- +am__objects_2 = archive64.lo
- +am_libbfd_la_OBJECTS = $(am__objects_1) $(am__objects_2)
- +libbfd_la_OBJECTS = $(am_libbfd_la_OBJECTS)
- +
- +DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
- +depcomp =
- +am__depfiles_maybe =
- +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
- +LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
- + $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
- CCLD = $(CC)
- -LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
- -DIST_COMMON = README ./stamp-h.in COPYING ChangeLog Makefile.am \
- -Makefile.in TODO acinclude.m4 aclocal.m4 bfd-in2.h config.in configure \
- -configure.in version.h
- -
- -
- -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
- -
- -TAR = gtar
- -GZIP_ENV = --best
- +LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- + $(AM_LDFLAGS) $(LDFLAGS) -o $@
- +DIST_SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES)
- +
- +RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
- + ps-recursive uninstall-info-recursive all-recursive \
- + install-data-recursive install-exec-recursive \
- + installdirs-recursive install-recursive uninstall-recursive \
- + check-recursive installcheck-recursive
- SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES)
- -OBJECTS = $(libbfd_a_OBJECTS) $(libbfd_la_OBJECTS)
-
- -all: all-redirect
- +all: config.h
- + $(MAKE) $(AM_MAKEFLAGS) all-recursive
- +
- .SUFFIXES:
- -.SUFFIXES: .S .c .lo .o .obj .s
- +.SUFFIXES: .c .lo .o .obj
- +
- +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- + configure.lineno
- $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- - cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
- + cd $(top_srcdir) && \
- + $(AUTOMAKE) --cygnus Makefile
-
- -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- - cd $(top_builddir) \
- - && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
- +$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- + $(SHELL) ./config.status --recheck
- +$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- + cd $(srcdir) && $(AUTOCONF)
-
- $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
- - cd $(srcdir) && $(ACLOCAL)
- -$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- - cd $(srcdir) && $(AUTOCONF)
- + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
- -config.h: stamp-h
- - @if test ! -f $@; then \
- - rm -f stamp-h; \
- - $(MAKE) stamp-h; \
- - else :; fi
- -stamp-h: $(srcdir)/config.in $(top_builddir)/config.status
- - cd $(top_builddir) \
- - && CONFIG_FILES= CONFIG_HEADERS=config.h:config.in \
- - $(SHELL) ./config.status
- - @echo timestamp > stamp-h 2> /dev/null
- -$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
- +config.h: stamp-h1
- @if test ! -f $@; then \
- - rm -f $(srcdir)/stamp-h.in; \
- - $(MAKE) $(srcdir)/stamp-h.in; \
- + rm -f stamp-h1; \
- + $(MAKE) stamp-h1; \
- else :; fi
- -$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
- - cd $(top_srcdir) && $(AUTOHEADER)
- - @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
-
- -mostlyclean-hdr:
- +stamp-h1: $(srcdir)/config.in $(top_builddir)/config.status
- + @rm -f stamp-h1
- + cd $(top_builddir) && $(SHELL) ./config.status config.h
-
- -clean-hdr:
- +$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.in $(ACLOCAL_M4)
- + cd $(top_srcdir) && $(AUTOHEADER)
- + touch $(srcdir)/config.in
-
- distclean-hdr:
- - -rm -f config.h
- -
- -maintainer-clean-hdr:
- + -rm -f config.h stamp-h1
- bfd-in3.h: $(top_builddir)/config.status bfd-in2.h
- - cd $(top_builddir) && CONFIG_FILES=$@:bfd-in2.h CONFIG_HEADERS= $(SHELL) ./config.status
- + cd $(top_builddir) && $(SHELL) ./config.status $@
- bfdver.h: $(top_builddir)/config.status version.h
- - cd $(top_builddir) && CONFIG_FILES=$@:version.h CONFIG_HEADERS= $(SHELL) ./config.status
- -
- -mostlyclean-noinstLIBRARIES:
- + cd $(top_builddir) && $(SHELL) ./config.status $@
- +po/Makefile.in: $(top_builddir)/config.status $(top_srcdir)/po/Make-in
- + cd $(top_builddir) && $(SHELL) ./config.status $@
-
- clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
- +bfdlibLTLIBRARIES_INSTALL = $(INSTALL)
-
- -distclean-noinstLIBRARIES:
- -
- -maintainer-clean-noinstLIBRARIES:
- -
- -.c.o:
- - $(COMPILE) -c $<
- -
- -# FIXME: We should only use cygpath when building on Windows,
- -# and only if it is available.
- -.c.obj:
- - $(COMPILE) -c `cygpath -w $<`
- -
- -.s.o:
- - $(COMPILE) -c $<
- -
- -.S.o:
- - $(COMPILE) -c $<
- +clean-bfdlibLTLIBRARIES:
- + -test -z "$(bfdlib_LTLIBRARIES)" || rm -f $(bfdlib_LTLIBRARIES)
- + @list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \
- + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- + test "$$dir" = "$$p" && dir=.; \
- + echo "rm -f \"$${dir}/so_locations\""; \
- + rm -f "$${dir}/so_locations"; \
- + done
- +libbfd.la: $(libbfd_la_OBJECTS) $(libbfd_la_DEPENDENCIES)
- + $(LINK) -rpath $(bfdlibdir) $(libbfd_la_LDFLAGS) $(libbfd_la_OBJECTS) $(libbfd_la_LIBADD) $(LIBS)
-
- mostlyclean-compile:
- - -rm -f *.o core *.core
- - -rm -f *.$(OBJEXT)
- -
- -clean-compile:
- + -rm -f *.$(OBJEXT) core *.core
-
- distclean-compile:
- -rm -f *.tab.c
-
- -maintainer-clean-compile:
- -
- -.c.lo:
- - $(LIBTOOL) --mode=compile $(COMPILE) -c $<
- +.c.o:
- + $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
-
- -.s.lo:
- - $(LIBTOOL) --mode=compile $(COMPILE) -c $<
- +.c.obj:
- + $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
-
- -.S.lo:
- - $(LIBTOOL) --mode=compile $(COMPILE) -c $<
- +.c.lo:
- + $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
-
- mostlyclean-libtool:
- -rm -f *.lo
- @@ -911,20 +953,8 @@
- -rm -rf .libs _libs
-
- distclean-libtool:
- -
- -maintainer-clean-libtool:
- -
- -mostlyclean-bfdlibLTLIBRARIES:
- -
- -clean-bfdlibLTLIBRARIES:
- - -test -z "$(bfdlib_LTLIBRARIES)" || rm -f $(bfdlib_LTLIBRARIES)
- -
- -distclean-bfdlibLTLIBRARIES:
- -
- -maintainer-clean-bfdlibLTLIBRARIES:
- -
- -libbfd.la: $(libbfd_la_OBJECTS) $(libbfd_la_DEPENDENCIES)
- - $(LINK) -rpath $(bfdlibdir) $(libbfd_la_LDFLAGS) $(libbfd_la_OBJECTS) $(libbfd_la_LIBADD) $(LIBS)
- + -rm -f libtool
- +uninstall-info-am:
-
- # This directory's subdirectories are mostly independent; you can cd
- # into them and run `make' without going through this Makefile.
- @@ -932,13 +962,8 @@
- # (1) if the variable is set in `config.status', edit `config.status'
- # (which will cause the Makefiles to be regenerated when you run `make');
- # (2) otherwise, pass the desired values on the `make' command line.
- -
- -@SET_MAKE@
- -
- -all-recursive install-data-recursive install-exec-recursive \
- -installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
- -check-recursive installcheck-recursive info-recursive dvi-recursive:
- - @set fnord $(MAKEFLAGS); amf=$$2; \
- +$(RECURSIVE_TARGETS):
- + @set fnord $$MAKEFLAGS; amf=$$2; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- @@ -958,13 +983,18 @@
-
- mostlyclean-recursive clean-recursive distclean-recursive \
- maintainer-clean-recursive:
- - @set fnord $(MAKEFLAGS); amf=$$2; \
- + @set fnord $$MAKEFLAGS; amf=$$2; \
- dot_seen=no; \
- - rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
- + case "$@" in \
- + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- + *) list='$(SUBDIRS)' ;; \
- + esac; \
- + rev=''; for subdir in $$list; do \
- + if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- - test "$$subdir" != "." || dot_seen=yes; \
- + fi; \
- done; \
- - test "$$dot_seen" = "no" && rev=". $$rev"; \
- + rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- @@ -980,132 +1010,96 @@
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
- +ctags-recursive:
- + list='$(SUBDIRS)'; for subdir in $$list; do \
- + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- + done
- +
- +ETAGS = etags
- +ETAGSFLAGS =
- +
- +CTAGS = ctags
- +CTAGSFLAGS =
-
- tags: TAGS
-
- -ID: $(HEADERS) $(SOURCES) $(LISP)
- - list='$(SOURCES) $(HEADERS)'; \
- - unique=`for i in $$list; do echo $$i; done | \
- - awk ' { files[$$0] = 1; } \
- +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- + unique=`for i in $$list; do \
- + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- + done | \
- + $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- - here=`pwd` && cd $(srcdir) \
- - && mkid -f$$here/ID $$unique $(LISP)
- + mkid -fID $$unique
-
- -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
- +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \
- + $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- + if (etags --etags-include --version) >/dev/null 2>&1; then \
- + include_option=--etags-include; \
- + else \
- + include_option=--include; \
- + fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- - test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
- + test -f $$subdir/TAGS && \
- + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- - list='$(SOURCES) $(HEADERS)'; \
- - unique=`for i in $$list; do echo $$i; done | \
- - awk ' { files[$$0] = 1; } \
- + list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \
- + unique=`for i in $$list; do \
- + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- + done | \
- + $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- - test -z "$(ETAGS_ARGS)config.in$$unique$(LISP)$$tags" \
- - || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.in $$unique $(LISP) -o $$here/TAGS)
- -
- -mostlyclean-tags:
- -
- -clean-tags:
- + test -z "$(ETAGS_ARGS)$$tags$$unique" \
- + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- + $$tags $$unique
- +
- +ctags: CTAGS
- +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \
- + $(TAGS_FILES) $(LISP)
- + tags=; \
- + here=`pwd`; \
- + list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \
- + unique=`for i in $$list; do \
- + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- + done | \
- + $(AWK) ' { files[$$0] = 1; } \
- + END { for (i in files) print i; }'`; \
- + test -z "$(CTAGS_ARGS)$$tags$$unique" \
- + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- + $$tags $$unique
- +
- +GTAGS:
- + here=`$(am__cd) $(top_builddir) && pwd` \
- + && cd $(top_srcdir) \
- + && gtags -i $(GTAGS_ARGS) $$here
-
- distclean-tags:
- - -rm -f TAGS ID
- -
- -maintainer-clean-tags:
- -
- -distdir = $(PACKAGE)-$(VERSION)
- -top_distdir = $(distdir)
- -
- -# This target untars the dist file and tries a VPATH configuration. Then
- -# it guarantees that the distribution is self-contained by making another
- -# tarfile.
- -distcheck: dist
- - -rm -rf $(distdir)
- - GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- - mkdir $(distdir)/=build
- - mkdir $(distdir)/=inst
- - dc_install_base=`cd $(distdir)/=inst && pwd`; \
- - cd $(distdir)/=build \
- - && ../configure --srcdir=.. --prefix=$$dc_install_base \
- - && $(MAKE) $(AM_MAKEFLAGS) \
- - && $(MAKE) $(AM_MAKEFLAGS) dvi \
- - && $(MAKE) $(AM_MAKEFLAGS) check \
- - && $(MAKE) $(AM_MAKEFLAGS) install \
- - && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- - && $(MAKE) $(AM_MAKEFLAGS) dist
- - -rm -rf $(distdir)
- - @banner="$(distdir).tar.gz is ready for distribution"; \
- - dashes=`echo "$$banner" | sed s/./=/g`; \
- - echo "$$dashes"; \
- - echo "$$banner"; \
- - echo "$$dashes"
- -dist: distdir
- - -chmod -R a+r $(distdir)
- - GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- - -rm -rf $(distdir)
- -dist-all: distdir
- - -chmod -R a+r $(distdir)
- - GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- - -rm -rf $(distdir)
- -distdir: $(DISTFILES)
- - -rm -rf $(distdir)
- - mkdir $(distdir)
- - -chmod 777 $(distdir)
- - @for file in $(DISTFILES); do \
- - if test -f $$file; then d=.; else d=$(srcdir); fi; \
- - if test -d $$d/$$file; then \
- - cp -pr $$d/$$file $(distdir)/$$file; \
- - else \
- - test -f $(distdir)/$$file \
- - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- - || cp -p $$d/$$file $(distdir)/$$file || :; \
- - fi; \
- - done
- - for subdir in $(SUBDIRS); do \
- - if test "$$subdir" = .; then :; else \
- - test -d $(distdir)/$$subdir \
- - || mkdir $(distdir)/$$subdir \
- - || exit 1; \
- - chmod 777 $(distdir)/$$subdir; \
- - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
- - || exit 1; \
- - fi; \
- - done
- -info-am:
- -info: info-recursive
- -dvi-am:
- -dvi: dvi-recursive
- + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
- check-am:
- check: check-recursive
- -installcheck-am:
- -installcheck: installcheck-recursive
- -install-info-am:
- -install-info: install-info-recursive
- -all-recursive-am: config.h
- - $(MAKE) $(AM_MAKEFLAGS) all-recursive
- +all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) config.h
- +installdirs: installdirs-recursive
- +installdirs-am:
- + $(mkinstalldirs) $(DESTDIR)$(bfdlibdir)
-
- -install-exec-am:
- +install: install-recursive
- install-exec: install-exec-recursive
- -
- -install-data-am: install-bfdlibLTLIBRARIES
- install-data: install-data-recursive
- +uninstall: uninstall-recursive
-
- install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
- -install: install-recursive
- -uninstall-am: uninstall-bfdlibLTLIBRARIES
- -uninstall: uninstall-recursive
- -all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) config.h
- -all-redirect: all-recursive-am
- -install-strip:
- - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
- -installdirs: installdirs-recursive
- -installdirs-am:
- - $(mkinstalldirs) $(DESTDIR)$(bfdlibdir)
- -
-
- +installcheck: installcheck-recursive
- +install-strip:
- + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- + INSTALL_STRIP_FLAG=-s \
- + `test -z '$(STRIP)' || \
- + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
- mostlyclean-generic:
- -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
-
- @@ -1114,64 +1108,79 @@
-
- distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- - -rm -f config.cache config.log stamp-h stamp-h[0-9]*
- -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
-
- maintainer-clean-generic:
- -mostlyclean-am: mostlyclean-hdr mostlyclean-noinstLIBRARIES \
- - mostlyclean-compile mostlyclean-libtool \
- - mostlyclean-bfdlibLTLIBRARIES mostlyclean-tags \
- - mostlyclean-generic
- + @echo "This command is intended for maintainers to use"
- + @echo "it deletes files that may require special tools to rebuild."
- +clean: clean-recursive
-
- -mostlyclean: mostlyclean-recursive
- +clean-am: clean-bfdlibLTLIBRARIES clean-generic clean-libtool \
- + clean-noinstLIBRARIES mostlyclean-am
-
- -clean-am: clean-hdr clean-noinstLIBRARIES clean-compile clean-libtool \
- - clean-bfdlibLTLIBRARIES clean-tags clean-generic \
- - mostlyclean-am
- +distclean: distclean-recursive
- + -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- +distclean-am: clean-am distclean-compile distclean-generic distclean-hdr \
- + distclean-libtool distclean-tags
-
- -clean: clean-recursive
- +dvi: dvi-recursive
-
- -distclean-am: distclean-hdr distclean-noinstLIBRARIES distclean-compile \
- - distclean-libtool distclean-bfdlibLTLIBRARIES \
- - distclean-tags distclean-generic clean-am
- - -rm -f libtool
- +dvi-am:
-
- -distclean: distclean-recursive
- - -rm -f config.status
- +info: info-recursive
-
- -maintainer-clean-am: maintainer-clean-hdr \
- - maintainer-clean-noinstLIBRARIES \
- - maintainer-clean-compile maintainer-clean-libtool \
- - maintainer-clean-bfdlibLTLIBRARIES \
- - maintainer-clean-tags maintainer-clean-generic \
- - distclean-am
- - @echo "This command is intended for maintainers to use;"
- - @echo "it deletes files that may require special tools to rebuild."
- +info-am:
- +
- +install-data-am: install-bfdlibLTLIBRARIES
- +
- +install-exec-am:
- +
- +install-info:
- +
- +install-man:
- +
- +installcheck-am:
-
- maintainer-clean: maintainer-clean-recursive
- - -rm -f config.status
- + -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- + -rm -rf autom4te.cache
- +maintainer-clean-am: distclean-am maintainer-clean-generic
-
- -.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
- -mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
- -clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
- -mostlyclean-compile distclean-compile clean-compile \
- -maintainer-clean-compile mostlyclean-libtool distclean-libtool \
- -clean-libtool maintainer-clean-libtool mostlyclean-bfdlibLTLIBRARIES \
- -distclean-bfdlibLTLIBRARIES clean-bfdlibLTLIBRARIES \
- -maintainer-clean-bfdlibLTLIBRARIES uninstall-bfdlibLTLIBRARIES \
- -install-bfdlibLTLIBRARIES install-data-recursive \
- -uninstall-data-recursive install-exec-recursive \
- -uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
- -all-recursive check-recursive installcheck-recursive info-recursive \
- -dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
- -maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
- -distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
- -dvi-am dvi check check-am installcheck-am installcheck install-info-am \
- -install-info all-recursive-am install-exec-am install-exec \
- -install-data-am install-data install-am install uninstall-am uninstall \
- -all-redirect all-am all installdirs-am installdirs mostlyclean-generic \
- -distclean-generic clean-generic maintainer-clean-generic clean \
- -mostlyclean distclean maintainer-clean
- +mostlyclean: mostlyclean-recursive
- +
- +mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- + mostlyclean-libtool
- +
- +pdf: pdf-recursive
- +
- +pdf-am:
- +
- +ps: ps-recursive
- +
- +ps-am:
- +
- +uninstall-am: uninstall-bfdlibLTLIBRARIES
- +
- +uninstall-info: uninstall-info-recursive
- +
- +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
- + clean-bfdlibLTLIBRARIES clean-generic clean-libtool \
- + clean-noinstLIBRARIES clean-recursive ctags ctags-recursive \
- + distclean distclean-compile distclean-generic distclean-hdr \
- + distclean-libtool distclean-recursive distclean-tags dvi dvi-am \
- + dvi-recursive info info-am info-recursive install install-am \
- + install-bfdlibLTLIBRARIES install-data install-data-am \
- + install-data-recursive install-exec install-exec-am \
- + install-exec-recursive install-info install-info-am install-man \
- + install-recursive install-strip installcheck installcheck-am \
- + installdirs installdirs-am installdirs-recursive \
- + maintainer-clean maintainer-clean-generic \
- + maintainer-clean-recursive mostlyclean mostlyclean-compile \
- + mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
- + pdf pdf-am pdf-recursive ps ps-am ps-recursive tags \
- + tags-recursive uninstall uninstall-am \
- + uninstall-bfdlibLTLIBRARIES uninstall-info-am \
- + uninstall-info-recursive uninstall-recursive
-
-
- po/SRC-POTFILES.in: @MAINT@ Makefile $(SRC_POTFILES)
- @@ -1502,6 +1511,9 @@
- cpu-xstormy16.lo: cpu-xstormy16.c $(INCDIR)/filenames.h
- cpu-xtensa.lo: cpu-xtensa.c $(INCDIR)/filenames.h
- cpu-z8k.lo: cpu-z8k.c $(INCDIR)/filenames.h
- +amigaos.lo: amigaos.c libamiga.h bfd.h
- +amigaoslink.lo: bfd.h libamiga.h amigaoslink.c
- +aout-amiga.lo: aout-amiga.c aoutf1.h bfd.h
- aout-adobe.lo: aout-adobe.c $(INCDIR)/filenames.h $(INCDIR)/aout/adobe.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h \
- $(INCDIR)/bfdlink.h
- @@ -1655,6 +1667,10 @@
- elf.lo: elf.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/libiberty.h
- +elf32-amiga.lo: elf32-amiga.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- + $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
- + elf32-target.h
- elf32-arc.lo: elf32-arc.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h \
- @@ -1714,6 +1730,10 @@
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
- +elf32-i386-amithlon.lo: elf32-i386-amithlon.c elf32-i386.c $(INCDIR)/filenames.h \
- + $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \
- + $(INCDIR)/elf/reloc-macros.h elf32-target.h
- elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h \
- @@ -1795,6 +1815,10 @@
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
- +elf32-morphos.lo: elf32-morphos.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- + $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
- + elf32-target.h
- elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
- diff -urNEBb binutils-2.14-orig/bfd/aclocal.m4 binutils-2.14/bfd/aclocal.m4
- --- binutils-2.14-orig/bfd/aclocal.m4 2003-05-02 18:06:14.000000000 +0200
- +++ binutils-2.14/bfd/aclocal.m4 2003-12-02 14:09:39.000000000 +0100
- @@ -1,14 +1,15 @@
- -dnl aclocal.m4 generated automatically by aclocal 1.4-p5
- +# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
-
- -dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
- -dnl This file is free software; the Free Software Foundation
- -dnl gives unlimited permission to copy and/or distribute it,
- -dnl with or without modifications, as long as this notice is preserved.
- -
- -dnl This program is distributed in the hope that it will be useful,
- -dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
- -dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- -dnl PARTICULAR PURPOSE.
- +# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
- +# Free Software Foundation, Inc.
- +# This file is free software; the Free Software Foundation
- +# gives unlimited permission to copy and/or distribute it,
- +# with or without modifications, as long as this notice is preserved.
- +
- +# This program is distributed in the hope that it will be useful,
- +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
- +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- +# PARTICULAR PURPOSE.
-
- dnl See whether we need to use fopen-bin.h rather than fopen-same.h.
- AC_DEFUN(BFD_BINARY_FOPEN,
- @@ -160,18 +161,76 @@
- ]
- )
-
- -# Define a conditional.
- +# AM_CONDITIONAL -*- Autoconf -*-
- +
- +# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
- +
- +# This program is free software; you can redistribute it and/or modify
- +# it under the terms of the GNU General Public License as published by
- +# the Free Software Foundation; either version 2, or (at your option)
- +# any later version.
- +
- +# This program is distributed in the hope that it will be useful,
- +# but WITHOUT ANY WARRANTY; without even the implied warranty of
- +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +# GNU General Public License for more details.
- +
- +# You should have received a copy of the GNU General Public License
- +# along with this program; if not, write to the Free Software
- +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- +# 02111-1307, USA.
- +
- +# serial 5
- +
- +AC_PREREQ(2.52)
-
- +# AM_CONDITIONAL(NAME, SHELL-CONDITION)
- +# -------------------------------------
- +# Define a conditional.
- AC_DEFUN([AM_CONDITIONAL],
- -[AC_SUBST($1_TRUE)
- -AC_SUBST($1_FALSE)
- +[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
- + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
- +AC_SUBST([$1_TRUE])
- +AC_SUBST([$1_FALSE])
- if $2; then
- $1_TRUE=
- $1_FALSE='#'
- else
- $1_TRUE='#'
- $1_FALSE=
- -fi])
- +fi
- +AC_CONFIG_COMMANDS_PRE(
- +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
- + AC_MSG_ERROR([conditional \"$1\" was never defined.
- +Usually this means the macro was only invoked conditionally.])
- +fi])])
- +
- +# isc-posix.m4 serial 2 (gettext-0.11.2)
- +dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
- +dnl This file is free software, distributed under the terms of the GNU
- +dnl General Public License. As a special exception to the GNU General
- +dnl Public License, this file may be distributed as part of a program
- +dnl that contains a configuration script generated by Autoconf, under
- +dnl the same distribution terms as the rest of that program.
- +
- +# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
- +
- +# This test replaces the one in autoconf.
- +# Currently this macro should have the same name as the autoconf macro
- +# because gettext's gettext.m4 (distributed in the automake package)
- +# still uses it. Otherwise, the use in gettext.m4 makes autoheader
- +# give these diagnostics:
- +# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
- +# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
- +
- +undefine([AC_ISC_POSIX])
- +
- +AC_DEFUN([AC_ISC_POSIX],
- + [
- + dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
- + AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
- + ]
- +)
-
- #serial 1
- # This test replaces the one in autoconf.
- @@ -195,57 +254,221 @@
- # some checks are only needed if your package does certain things.
- # But this isn't really a big deal.
-
- -# serial 1
- +# This macro actually does too much some checks are only needed if
- +# your package does certain things. But this isn't really a big deal.
-
- -dnl Usage:
- -dnl AM_INIT_AUTOMAKE(package,version, [no-define])
- +# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
- +# Free Software Foundation, Inc.
-
- +# This program is free software; you can redistribute it and/or modify
- +# it under the terms of the GNU General Public License as published by
- +# the Free Software Foundation; either version 2, or (at your option)
- +# any later version.
- +
- +# This program is distributed in the hope that it will be useful,
- +# but WITHOUT ANY WARRANTY; without even the implied warranty of
- +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +# GNU General Public License for more details.
- +
- +# You should have received a copy of the GNU General Public License
- +# along with this program; if not, write to the Free Software
- +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- +# 02111-1307, USA.
- +
- +# serial 8
- +
- +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
- +# written in clear, in which case automake, when reading aclocal.m4,
- +# will think it sees a *use*, and therefore will trigger all it's
- +# C support machinery. Also note that it means that autoscan, seeing
- +# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
- +
- +
- +AC_PREREQ([2.52])
- +
- +# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
- +# the ones we care about.
- +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
- +
- +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
- +# AM_INIT_AUTOMAKE([OPTIONS])
- +# -----------------------------------------------
- +# The call with PACKAGE and VERSION arguments is the old style
- +# call (pre autoconf-2.50), which is being phased out. PACKAGE
- +# and VERSION should now be passed to AC_INIT and removed from
- +# the call to AM_INIT_AUTOMAKE.
- +# We support both call styles for the transition. After
- +# the next Automake release, Autoconf can make the AC_INIT
- +# arguments mandatory, and then we can depend on a new Autoconf
- +# release and drop the old call support.
- AC_DEFUN([AM_INIT_AUTOMAKE],
- -[AC_REQUIRE([AC_PROG_INSTALL])
- -PACKAGE=[$1]
- -AC_SUBST(PACKAGE)
- -VERSION=[$2]
- -AC_SUBST(VERSION)
- -dnl test to see if srcdir already configured
- -if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- +[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
- + AC_REQUIRE([AC_PROG_INSTALL])dnl
- +# test to see if srcdir already configured
- +if test "`cd $srcdir && pwd`" != "`pwd`" &&
- + test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
- fi
- -ifelse([$3],,
- -AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- -AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
- -AC_REQUIRE([AM_SANITY_CHECK])
- -AC_REQUIRE([AC_ARG_PROGRAM])
- -dnl FIXME This is truly gross.
- -missing_dir=`cd $ac_aux_dir && pwd`
- -AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
- -AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
- -AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
- -AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
- -AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
- -AC_REQUIRE([AC_PROG_MAKE_SET])])
- +
- +# Define the identity of the package.
- +dnl Distinguish between old-style and new-style calls.
- +m4_ifval([$2],
- +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- + AC_SUBST([PACKAGE], [$1])dnl
- + AC_SUBST([VERSION], [$2])],
- +[_AM_SET_OPTIONS([$1])dnl
- + AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
- + AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
- +
- +_AM_IF_OPTION([no-define],,
- +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
- +
- +# Some tools Automake needs.
- +AC_REQUIRE([AM_SANITY_CHECK])dnl
- +AC_REQUIRE([AC_ARG_PROGRAM])dnl
- +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
- +AM_MISSING_PROG(AUTOCONF, autoconf)
- +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
- +AM_MISSING_PROG(AUTOHEADER, autoheader)
- +AM_MISSING_PROG(MAKEINFO, makeinfo)
- +AM_MISSING_PROG(AMTAR, tar)
- +AM_PROG_INSTALL_SH
- +AM_PROG_INSTALL_STRIP
- +# We need awk for the "check" target. The system "awk" is bad on
- +# some platforms.
- +AC_REQUIRE([AC_PROG_AWK])dnl
- +AC_REQUIRE([AC_PROG_MAKE_SET])dnl
- +
- +_AM_IF_OPTION([no-dependencies],,
- +[AC_PROVIDE_IFELSE([AC_PROG_][CC],
- + [_AM_DEPENDENCIES(CC)],
- + [define([AC_PROG_][CC],
- + defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
- +AC_PROVIDE_IFELSE([AC_PROG_][CXX],
- + [_AM_DEPENDENCIES(CXX)],
- + [define([AC_PROG_][CXX],
- + defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
- +])
- +])
- +
- +# Copyright 2002 Free Software Foundation, Inc.
- +
- +# This program is free software; you can redistribute it and/or modify
- +# it under the terms of the GNU General Public License as published by
- +# the Free Software Foundation; either version 2, or (at your option)
- +# any later version.
- +
- +# This program is distributed in the hope that it will be useful,
- +# but WITHOUT ANY WARRANTY; without even the implied warranty of
- +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +# GNU General Public License for more details.
- +
- +# You should have received a copy of the GNU General Public License
- +# along with this program; if not, write to the Free Software
- +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- +
- +# AM_AUTOMAKE_VERSION(VERSION)
- +# ----------------------------
- +# Automake X.Y traces this macro to ensure aclocal.m4 has been
- +# generated from the m4 files accompanying Automake X.Y.
- +AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
- +
- +# AM_SET_CURRENT_AUTOMAKE_VERSION
- +# -------------------------------
- +# Call AM_AUTOMAKE_VERSION so it can be traced.
- +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
- +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- + [AM_AUTOMAKE_VERSION([1.6.3])])
- +
- +# Helper functions for option handling. -*- Autoconf -*-
- +
- +# Copyright 2001, 2002 Free Software Foundation, Inc.
- +
- +# This program is free software; you can redistribute it and/or modify
- +# it under the terms of the GNU General Public License as published by
- +# the Free Software Foundation; either version 2, or (at your option)
- +# any later version.
- +
- +# This program is distributed in the hope that it will be useful,
- +# but WITHOUT ANY WARRANTY; without even the implied warranty of
- +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +# GNU General Public License for more details.
- +
- +# You should have received a copy of the GNU General Public License
- +# along with this program; if not, write to the Free Software
- +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- +# 02111-1307, USA.
- +
- +# serial 2
- +
- +# _AM_MANGLE_OPTION(NAME)
- +# -----------------------
- +AC_DEFUN([_AM_MANGLE_OPTION],
- +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
- +
- +# _AM_SET_OPTION(NAME)
- +# ------------------------------
- +# Set option NAME. Presently that only means defining a flag for this option.
- +AC_DEFUN([_AM_SET_OPTION],
- +[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
- +
- +# _AM_SET_OPTIONS(OPTIONS)
- +# ----------------------------------
- +# OPTIONS is a space-separated list of Automake options.
- +AC_DEFUN([_AM_SET_OPTIONS],
- +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
- +
- +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
- +# -------------------------------------------
- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
- +AC_DEFUN([_AM_IF_OPTION],
- +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
- #
- # Check to make sure that the build environment is sane.
- #
-
- +# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
- +
- +# This program is free software; you can redistribute it and/or modify
- +# it under the terms of the GNU General Public License as published by
- +# the Free Software Foundation; either version 2, or (at your option)
- +# any later version.
- +
- +# This program is distributed in the hope that it will be useful,
- +# but WITHOUT ANY WARRANTY; without even the implied warranty of
- +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +# GNU General Public License for more details.
- +
- +# You should have received a copy of the GNU General Public License
- +# along with this program; if not, write to the Free Software
- +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- +# 02111-1307, USA.
- +
- +# serial 3
- +
- +# AM_SANITY_CHECK
- +# ---------------
- AC_DEFUN([AM_SANITY_CHECK],
- [AC_MSG_CHECKING([whether build environment is sane])
- # Just in case
- sleep 1
- -echo timestamp > conftestfile
- +echo timestamp > conftest.file
- # Do `set' in a subshell so we don't clobber the current shell's
- # arguments. Must try -L first in case configure is actually a
- # symlink; some systems play weird games with the mod time of symlinks
- # (eg FreeBSD returns the mod time of the symlink's containing
- # directory).
- if (
- - set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- - if test "[$]*" = "X"; then
- + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
- + if test "$[*]" = "X"; then
- # -L didn't work.
- - set X `ls -t $srcdir/configure conftestfile`
- + set X `ls -t $srcdir/configure conftest.file`
- fi
- - if test "[$]*" != "X $srcdir/configure conftestfile" \
- - && test "[$]*" != "X conftestfile $srcdir/configure"; then
- + rm -f conftest.file
- + if test "$[*]" != "X $srcdir/configure conftest.file" \
- + && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- @@ -255,7 +478,7 @@
- alias in your environment])
- fi
-
- - test "[$]2" = conftestfile
- + test "$[2]" = conftest.file
- )
- then
- # Ok.
- @@ -264,51 +487,570 @@
- AC_MSG_ERROR([newly created file is older than distributed files!
- Check your system clock])
- fi
- -rm -f conftest*
- AC_MSG_RESULT(yes)])
-
- -dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
- -dnl The program must properly implement --version.
- +# -*- Autoconf -*-
- +
- +
- +# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
- +
- +# This program is free software; you can redistribute it and/or modify
- +# it under the terms of the GNU General Public License as published by
- +# the Free Software Foundation; either version 2, or (at your option)
- +# any later version.
- +
- +# This program is distributed in the hope that it will be useful,
- +# but WITHOUT ANY WARRANTY; without even the implied warranty of
- +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +# GNU General Public License for more details.
- +
- +# You should have received a copy of the GNU General Public License
- +# along with this program; if not, write to the Free Software
- +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- +# 02111-1307, USA.
- +
- +# serial 3
- +
- +# AM_MISSING_PROG(NAME, PROGRAM)
- +# ------------------------------
- AC_DEFUN([AM_MISSING_PROG],
- -[AC_MSG_CHECKING(for working $2)
- -# Run test in a subshell; some versions of sh will print an error if
- -# an executable is not found, even if stderr is redirected.
- -# Redirect stdin to placate older versions of autoconf. Sigh.
- -if ($2 --version) < /dev/null > /dev/null 2>&1; then
- - $1=$2
- - AC_MSG_RESULT(found)
- +[AC_REQUIRE([AM_MISSING_HAS_RUN])
- +$1=${$1-"${am_missing_run}$2"}
- +AC_SUBST($1)])
- +
- +
- +# AM_MISSING_HAS_RUN
- +# ------------------
- +# Define MISSING if not defined so far and test if it supports --run.
- +# If it does, set am_missing_run to use it, otherwise, to nothing.
- +AC_DEFUN([AM_MISSING_HAS_RUN],
- +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
- +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
- +# Use eval to expand $SHELL
- +if eval "$MISSING --run true"; then
- + am_missing_run="$MISSING --run "
- else
- - $1="$3/missing $2"
- - AC_MSG_RESULT(missing)
- + am_missing_run=
- + AC_MSG_WARN([`missing' script is too old or missing])
- fi
- -AC_SUBST($1)])
- +])
-
- -# Like AC_CONFIG_HEADER, but automatically create stamp file.
- +# AM_AUX_DIR_EXPAND
-
- -AC_DEFUN([AM_CONFIG_HEADER],
- -[AC_PREREQ([2.12])
- -AC_CONFIG_HEADER([$1])
- -dnl When config.status generates a header, we must update the stamp-h file.
- -dnl This file resides in the same directory as the config header
- -dnl that is generated. We must strip everything past the first ":",
- -dnl and everything past the last "/".
- -AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
- -ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
- -<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
- -<<am_indx=1
- -for am_file in <<$1>>; do
- - case " <<$>>CONFIG_HEADERS " in
- - *" <<$>>am_file "*<<)>>
- - echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
- +# Copyright 2001 Free Software Foundation, Inc.
- +
- +# This program is free software; you can redistribute it and/or modify
- +# it under the terms of the GNU General Public License as published by
- +# the Free Software Foundation; either version 2, or (at your option)
- +# any later version.
- +
- +# This program is distributed in the hope that it will be useful,
- +# but WITHOUT ANY WARRANTY; without even the implied warranty of
- +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +# GNU General Public License for more details.
- +
- +# You should have received a copy of the GNU General Public License
- +# along with this program; if not, write to the Free Software
- +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- +# 02111-1307, USA.
- +
- +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
- +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
- +# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
- +#
- +# Of course, Automake must honor this variable whenever it calls a
- +# tool from the auxiliary directory. The problem is that $srcdir (and
- +# therefore $ac_aux_dir as well) can be either absolute or relative,
- +# depending on how configure is run. This is pretty annoying, since
- +# it makes $ac_aux_dir quite unusable in subdirectories: in the top
- +# source directory, any form will work fine, but in subdirectories a
- +# relative path needs to be adjusted first.
- +#
- +# $ac_aux_dir/missing
- +# fails when called from a subdirectory if $ac_aux_dir is relative
- +# $top_srcdir/$ac_aux_dir/missing
- +# fails if $ac_aux_dir is absolute,
- +# fails when called from a subdirectory in a VPATH build with
- +# a relative $ac_aux_dir
- +#
- +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
- +# are both prefixed by $srcdir. In an in-source build this is usually
- +# harmless because $srcdir is `.', but things will broke when you
- +# start a VPATH build or use an absolute $srcdir.
- +#
- +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
- +# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
- +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
- +# and then we would define $MISSING as
- +# MISSING="\${SHELL} $am_aux_dir/missing"
- +# This will work as long as MISSING is not called from configure, because
- +# unfortunately $(top_srcdir) has no meaning in configure.
- +# However there are other variables, like CC, which are often used in
- +# configure, and could therefore not use this "fixed" $ac_aux_dir.
- +#
- +# Another solution, used here, is to always expand $ac_aux_dir to an
- +# absolute PATH. The drawback is that using absolute paths prevent a
- +# configured tree to be moved without reconfiguration.
- +
- +# Rely on autoconf to set up CDPATH properly.
- +AC_PREREQ([2.50])
- +
- +AC_DEFUN([AM_AUX_DIR_EXPAND], [
- +# expand $ac_aux_dir to an absolute path
- +am_aux_dir=`cd $ac_aux_dir && pwd`
- +])
- +
- +# AM_PROG_INSTALL_SH
- +# ------------------
- +# Define $install_sh.
- +
- +# Copyright 2001 Free Software Foundation, Inc.
- +
- +# This program is free software; you can redistribute it and/or modify
- +# it under the terms of the GNU General Public License as published by
- +# the Free Software Foundation; either version 2, or (at your option)
- +# any later version.
- +
- +# This program is distributed in the hope that it will be useful,
- +# but WITHOUT ANY WARRANTY; without even the implied warranty of
- +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +# GNU General Public License for more details.
- +
- +# You should have received a copy of the GNU General Public License
- +# along with this program; if not, write to the Free Software
- +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- +# 02111-1307, USA.
- +
- +AC_DEFUN([AM_PROG_INSTALL_SH],
- +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
- +install_sh=${install_sh-"$am_aux_dir/install-sh"}
- +AC_SUBST(install_sh)])
- +
- +# AM_PROG_INSTALL_STRIP
- +
- +# Copyright 2001 Free Software Foundation, Inc.
- +
- +# This program is free software; you can redistribute it and/or modify
- +# it under the terms of the GNU General Public License as published by
- +# the Free Software Foundation; either version 2, or (at your option)
- +# any later version.
- +
- +# This program is distributed in the hope that it will be useful,
- +# but WITHOUT ANY WARRANTY; without even the implied warranty of
- +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +# GNU General Public License for more details.
- +
- +# You should have received a copy of the GNU General Public License
- +# along with this program; if not, write to the Free Software
- +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- +# 02111-1307, USA.
- +
- +# One issue with vendor `install' (even GNU) is that you can't
- +# specify the program used to strip binaries. This is especially
- +# annoying in cross-compiling environments, where the build's strip
- +# is unlikely to handle the host's binaries.
- +# Fortunately install-sh will honor a STRIPPROG variable, so we
- +# always use install-sh in `make install-strip', and initialize
- +# STRIPPROG with the value of the STRIP variable (set by the user).
- +AC_DEFUN([AM_PROG_INSTALL_STRIP],
- +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
- +# Installed binaries are usually stripped using `strip' when the user
- +# run `make install-strip'. However `strip' might not be the right
- +# tool to use in cross-compilation environments, therefore Automake
- +# will honor the `STRIP' environment variable to overrule this program.
- +dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
- +if test "$cross_compiling" != no; then
- + AC_CHECK_TOOL([STRIP], [strip], :)
- +fi
- +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
- +AC_SUBST([INSTALL_STRIP_PROGRAM])])
- +
- +# serial 4 -*- Autoconf -*-
- +
- +# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
- +
- +# This program is free software; you can redistribute it and/or modify
- +# it under the terms of the GNU General Public License as published by
- +# the Free Software Foundation; either version 2, or (at your option)
- +# any later version.
- +
- +# This program is distributed in the hope that it will be useful,
- +# but WITHOUT ANY WARRANTY; without even the implied warranty of
- +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +# GNU General Public License for more details.
- +
- +# You should have received a copy of the GNU General Public License
- +# along with this program; if not, write to the Free Software
- +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- +# 02111-1307, USA.
- +
- +
- +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
- +# written in clear, in which case automake, when reading aclocal.m4,
- +# will think it sees a *use*, and therefore will trigger all it's
- +# C support machinery. Also note that it means that autoscan, seeing
- +# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
- +
- +
- +
- +# _AM_DEPENDENCIES(NAME)
- +# ----------------------
- +# See how the compiler implements dependency checking.
- +# NAME is "CC", "CXX", "GCJ", or "OBJC".
- +# We try a few techniques and use that to set a single cache variable.
- +#
- +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
- +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
- +# dependency, and given that the user is not expected to run this macro,
- +# just rely on AC_PROG_CC.
- +AC_DEFUN([_AM_DEPENDENCIES],
- +[AC_REQUIRE([AM_SET_DEPDIR])dnl
- +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
- +AC_REQUIRE([AM_MAKE_INCLUDE])dnl
- +AC_REQUIRE([AM_DEP_TRACK])dnl
- +
- +ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
- + [$1], CXX, [depcc="$CXX" am_compiler_list=],
- + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
- + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
- + [depcc="$$1" am_compiler_list=])
- +
- +AC_CACHE_CHECK([dependency style of $depcc],
- + [am_cv_$1_dependencies_compiler_type],
- +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- + # We make a subdir and do the tests there. Otherwise we can end up
- + # making bogus files that we don't know about and never remove. For
- + # instance it was reported that on HP-UX the gcc test will end up
- + # making a dummy file named `D' -- because `-MD' means `put the output
- + # in D'.
- + mkdir conftest.dir
- + # Copy depcomp to subdir because otherwise we won't find it if we're
- + # using a relative directory.
- + cp "$am_depcomp" conftest.dir
- + cd conftest.dir
- +
- + am_cv_$1_dependencies_compiler_type=none
- + if test "$am_compiler_list" = ""; then
- + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
- + fi
- + for depmode in $am_compiler_list; do
- + # We need to recreate these files for each test, as the compiler may
- + # overwrite some of them when testing with obscure command lines.
- + # This happens at least with the AIX C compiler.
- + echo '#include "conftest.h"' > conftest.c
- + echo 'int i;' > conftest.h
- + echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
- +
- + case $depmode in
- + nosideeffect)
- + # after this tag, mechanisms are not by side-effect, so they'll
- + # only be used when explicitly requested
- + if test "x$enable_dependency_tracking" = xyes; then
- + continue
- + else
- + break
- + fi
- ;;
- + none) break ;;
- esac
- - am_indx=`expr "<<$>>am_indx" + 1`
- -done<<>>dnl>>)
- -changequote([,]))])
- + # We check with `-c' and `-o' for the sake of the "dashmstdout"
- + # mode. It turns out that the SunPro C++ compiler does not properly
- + # handle `-M -o', and we need to detect this.
- + if depmode=$depmode \
- + source=conftest.c object=conftest.o \
- + depfile=conftest.Po tmpdepfile=conftest.TPo \
- + $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
- + grep conftest.h conftest.Po > /dev/null 2>&1 &&
- + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- + am_cv_$1_dependencies_compiler_type=$depmode
- + break
- + fi
- + done
- +
- + cd ..
- + rm -rf conftest.dir
- +else
- + am_cv_$1_dependencies_compiler_type=none
- +fi
- +])
- +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
- +])
- +
- +
- +# AM_SET_DEPDIR
- +# -------------
- +# Choose a directory name for dependency files.
- +# This macro is AC_REQUIREd in _AM_DEPENDENCIES
- +AC_DEFUN([AM_SET_DEPDIR],
- +[rm -f .deps 2>/dev/null
- +mkdir .deps 2>/dev/null
- +if test -d .deps; then
- + DEPDIR=.deps
- +else
- + # MS-DOS does not allow filenames that begin with a dot.
- + DEPDIR=_deps
- +fi
- +rmdir .deps 2>/dev/null
- +AC_SUBST([DEPDIR])
- +])
- +
- +
- +# AM_DEP_TRACK
- +# ------------
- +AC_DEFUN([AM_DEP_TRACK],
- +[AC_ARG_ENABLE(dependency-tracking,
- +[ --disable-dependency-tracking Speeds up one-time builds
- + --enable-dependency-tracking Do not reject slow dependency extractors])
- +if test "x$enable_dependency_tracking" != xno; then
- + am_depcomp="$ac_aux_dir/depcomp"
- + AMDEPBACKSLASH='\'
- +fi
- +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
- +AC_SUBST([AMDEPBACKSLASH])
- +])
- +
- +# Generate code to set up dependency tracking. -*- Autoconf -*-
- +
- +# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
- +
- +# This program is free software; you can redistribute it and/or modify
- +# it under the terms of the GNU General Public License as published by
- +# the Free Software Foundation; either version 2, or (at your option)
- +# any later version.
- +
- +# This program is distributed in the hope that it will be useful,
- +# but WITHOUT ANY WARRANTY; without even the implied warranty of
- +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +# GNU General Public License for more details.
- +
- +# You should have received a copy of the GNU General Public License
- +# along with this program; if not, write to the Free Software
- +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- +# 02111-1307, USA.
- +
- +#serial 2
- +
- +# _AM_OUTPUT_DEPENDENCY_COMMANDS
- +# ------------------------------
- +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
- +[for mf in $CONFIG_FILES; do
- + # Strip MF so we end up with the name of the file.
- + mf=`echo "$mf" | sed -e 's/:.*$//'`
- + # Check whether this is an Automake generated Makefile or not.
- + # We used to match only the files named `Makefile.in', but
- + # some people rename them; so instead we look at the file content.
- + # Grep'ing the first line is not enough: some people post-process
- + # each Makefile.in and add a new line on top of each file to say so.
- + # So let's grep whole file.
- + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
- + dirpart=`AS_DIRNAME("$mf")`
- + else
- + continue
- + fi
- + grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
- + # Extract the definition of DEP_FILES from the Makefile without
- + # running `make'.
- + DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
- + test -z "$DEPDIR" && continue
- + # When using ansi2knr, U may be empty or an underscore; expand it
- + U=`sed -n -e '/^U = / s///p' < "$mf"`
- + test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
- + # We invoke sed twice because it is the simplest approach to
- + # changing $(DEPDIR) to its actual value in the expansion.
- + for file in `sed -n -e '
- + /^DEP_FILES = .*\\\\$/ {
- + s/^DEP_FILES = //
- + :loop
- + s/\\\\$//
- + p
- + n
- + /\\\\$/ b loop
- + p
- + }
- + /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
- + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- + # Make sure the directory exists.
- + test -f "$dirpart/$file" && continue
- + fdir=`AS_DIRNAME(["$file"])`
- + AS_MKDIR_P([$dirpart/$fdir])
- + # echo "creating $dirpart/$file"
- + echo '# dummy' > "$dirpart/$file"
- + done
- +done
- +])# _AM_OUTPUT_DEPENDENCY_COMMANDS
- +
- +
- +# AM_OUTPUT_DEPENDENCY_COMMANDS
- +# -----------------------------
- +# This macro should only be invoked once -- use via AC_REQUIRE.
- +#
- +# This code is only required when automatic dependency tracking
- +# is enabled. FIXME. This creates each `.P' file that we will
- +# need in order to bootstrap the dependency handling code.
- +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
- +[AC_CONFIG_COMMANDS([depfiles],
- + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
- + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
- +])
- +
- +# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
- +
- +# This program is free software; you can redistribute it and/or modify
- +# it under the terms of the GNU General Public License as published by
- +# the Free Software Foundation; either version 2, or (at your option)
- +# any later version.
- +
- +# This program is distributed in the hope that it will be useful,
- +# but WITHOUT ANY WARRANTY; without even the implied warranty of
- +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +# GNU General Public License for more details.
- +
- +# You should have received a copy of the GNU General Public License
- +# along with this program; if not, write to the Free Software
- +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- +# 02111-1307, USA.
- +
- +# serial 2
- +
- +# AM_MAKE_INCLUDE()
- +# -----------------
- +# Check to see how make treats includes.
- +AC_DEFUN([AM_MAKE_INCLUDE],
- +[am_make=${MAKE-make}
- +cat > confinc << 'END'
- +doit:
- + @echo done
- +END
- +# If we don't find an include directive, just comment out the code.
- +AC_MSG_CHECKING([for style of include used by $am_make])
- +am__include="#"
- +am__quote=
- +_am_result=none
- +# First try GNU make style include.
- +echo "include confinc" > confmf
- +# We grep out `Entering directory' and `Leaving directory'
- +# messages which can occur if `w' ends up in MAKEFLAGS.
- +# In particular we don't look at `^make:' because GNU make might
- +# be invoked under some other name (usually "gmake"), in which
- +# case it prints its new name instead of `make'.
- +if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
- + am__include=include
- + am__quote=
- + _am_result=GNU
- +fi
- +# Now try BSD make style include.
- +if test "$am__include" = "#"; then
- + echo '.include "confinc"' > confmf
- + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
- + am__include=.include
- + am__quote="\""
- + _am_result=BSD
- + fi
- +fi
- +AC_SUBST(am__include)
- +AC_SUBST(am__quote)
- +AC_MSG_RESULT($_am_result)
- +rm -f confinc confmf
- +])
- +
- +# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
- +
- +# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
- +
- +# This program is free software; you can redistribute it and/or modify
- +# it under the terms of the GNU General Public License as published by
- +# the Free Software Foundation; either version 2, or (at your option)
- +# any later version.
- +
- +# This program is distributed in the hope that it will be useful,
- +# but WITHOUT ANY WARRANTY; without even the implied warranty of
- +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +# GNU General Public License for more details.
- +
- +# You should have received a copy of the GNU General Public License
- +# along with this program; if not, write to the Free Software
- +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- +# 02111-1307, USA.
- +
- +AC_PREREQ([2.52])
- +
- +# serial 6
- +
- +# When config.status generates a header, we must update the stamp-h file.
- +# This file resides in the same directory as the config header
- +# that is generated. We must strip everything past the first ":",
- +# and everything past the last "/".
- +
- +# _AM_DIRNAME(PATH)
- +# -----------------
- +# Like AS_DIRNAME, only do it during macro expansion
- +AC_DEFUN([_AM_DIRNAME],
- + [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
- + m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
- + m4_if(regexp([$1], [^/.*]), -1,
- + [.],
- + patsubst([$1], [^\(/\).*], [\1])),
- + patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
- + patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
- +])# _AM_DIRNAME
- +
- +
- +# The stamp files are numbered to have different names.
- +# We could number them on a directory basis, but that's additional
- +# complications, let's have a unique counter.
- +m4_define([_AM_STAMP_Count], [0])
- +
- +
- +# _AM_STAMP(HEADER)
- +# -----------------
- +# The name of the stamp file for HEADER.
- +AC_DEFUN([_AM_STAMP],
- +[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
- +AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
- + [:.*])))/stamp-h[]_AM_STAMP_Count])
- +
- +
- +# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
- +# ------------------------------------------------------------
- +# We used to try to get a real timestamp in stamp-h. But the fear is that
- +# that will cause unnecessary cvs conflicts.
- +AC_DEFUN([_AM_CONFIG_HEADER],
- +[# Add the stamp file to the list of files AC keeps track of,
- +# along with our hook.
- +AC_CONFIG_HEADERS([$1],
- + [# update the timestamp
- +echo 'timestamp for $1' >"_AM_STAMP([$1])"
- +$2],
- + [$3])
- +])# _AM_CONFIG_HEADER
- +
- +
- +# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
- +# --------------------------------------------------------------
- +AC_DEFUN([AM_CONFIG_HEADER],
- +[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
- +])# AM_CONFIG_HEADER
-
- # Add --enable-maintainer-mode option to configure.
- # From Jim Meyering
-
- +# Copyright 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
- +
- +# This program is free software; you can redistribute it and/or modify
- +# it under the terms of the GNU General Public License as published by
- +# the Free Software Foundation; either version 2, or (at your option)
- +# any later version.
- +
- +# This program is distributed in the hope that it will be useful,
- +# but WITHOUT ANY WARRANTY; without even the implied warranty of
- +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +# GNU General Public License for more details.
- +
- +# You should have received a copy of the GNU General Public License
- +# along with this program; if not, write to the Free Software
- +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- +# 02111-1307, USA.
- +
- # serial 1
-
- AC_DEFUN([AM_MAINTAINER_MODE],
- @@ -319,8 +1061,8 @@
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- - AC_MSG_RESULT($USE_MAINTAINER_MODE)
- - AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- + AC_MSG_RESULT([$USE_MAINTAINER_MODE])
- + AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
- ]
- diff -urNEBb binutils-2.14-orig/bfd/amigaos.c binutils-2.14/bfd/amigaos.c
- --- binutils-2.14-orig/bfd/amigaos.c 1970-01-01 01:00:00.000000000 +0100
- +++ binutils-2.14/bfd/amigaos.c 2003-12-02 14:09:39.000000000 +0100
- @@ -0,0 +1,3314 @@
- +/* BFD back-end for Commodore-Amiga AmigaOS binaries.
- + Copyright (C) 1990-1994 Free Software Foundation, Inc.
- + Contributed by Leonard Norrgard. Partially based on the bout
- + and ieee BFD backends and Markus Wild's tool hunk2gcc.
- + Revised and updated by Stephan Thesing
- +
- +This file is part of BFD, the Binary File Descriptor library.
- +
- +This program is free software; you can redistribute it and/or modify
- +it under the terms of the GNU General Public License as published by
- +the Free Software Foundation; either version 2 of the License, or
- +(at your option) any later version.
- +
- +This program is distributed in the hope that it will be useful,
- +but WITHOUT ANY WARRANTY; without even the implied warranty of
- +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +GNU General Public License for more details.
- +
- +You should have received a copy of the GNU General Public License
- +along with this program; if not, write to the Free Software
- +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
- +
- +/*
- +SECTION
- + amiga back end
- +
- +This section describes the overall structure of the Amiga BFD back end.
- +The linker stuff can be found in @xref{amigalink}.
- +@menu
- +@* implementation::
- +@* amigalink::
- +@end menu
- +
- +INODE
- +implementation, amigalink, amiga, amiga
- +
- +
- +SECTION
- + implementation
- +
- +
- +The need for a port of the bfd library for Amiga style object (hunk) files
- +arose by the desire to port the GNU debugger gdb to the Amiga.
- +Also, the linker ld should be updated to the current version (2.5.2).
- +@@*
- +This port bases on the work done by Leonard Norrgard, who started porting
- +gdb. Raphael Luebbert, who supports the ixemul.library, has also worked on
- +implementing the needed @code{ptrace()} system call and gas2.5.
- +
- +@menu
- +@* not supported::
- +@* Does it work ?::
- +@* TODO::
- +@end menu
- +
- +INODE
- +not supported, Does it work ?,implementation,implementation
- +SUBSECTION
- + not supported
- +
- +Currently, the implementation does not support Amiga link library files, like
- +e.g. amiga.lib. This may be added in a later version, if anyone starts work
- +on it, or I find some time for it.
- +
- +The handling of the symbols in hunk files is a little bit broken:
- + o The symbols in a load file are totally ignored at the moment, so gdb and gprof
- + do not work.
- + o The symbols of a object module (Hunk file, starting with HUNK_UNIT) are read in
- + correctly, but HUNK_SYMBOL hunks are also ignored.
- +
- +The reason for this is the following:
- +Amiga symbol hunks do not allow for much information. Only a name and a value are allowed.
- +On the other hand, a.out format carries along much more information (see, e.g. the
- +entry on set symbols in the ld manual). The old linker copied this information into
- +a HUNK_DEBUG hunk. Now there is the choice:
- + o ignoring the debug hunk, read in only HUNK_SYMBOL definitions => extra info is lost.
- + o read in the debug hunk and use the information therein => How can clashs between the
- + information in the debug hunk and HUNK_SYMBOL or HUNK_EXT hunks be avoided ?
- +I haven't decided yet, what to do about this.
- +
- +
- +Although bfd allows to link together object modules of different flavours,
- +producing a.out style executables does not work on Amiga :-)
- +It should, however, be possible to create a.out files with the -r option of ld
- +(incremental link).
- +
- +INODE
- +Does it work ?,TODO ,not supported , implementation
- +SUBSECTION
- + Does it work ?
- +
- +Currently, the following utilities work:
- + o objdump
- + o objcopy
- + o strip
- + o nm
- + o ar
- + o gas
- +
- +
- +INODE
- +TODO, , Does it work ?, implementation
- +SUBSECTION
- + TODO
- +
- + o fix fixme:s
- +
- +@*
- +BFD:
- + o add flag to say if the format allows multiple sections with the
- + same name. Fix bfd_get_section_by_name() and bfd_make_section()
- + accordingly.
- +
- + o dumpobj.c: the disassembler: use relocation record data to find symbolic
- + names of addresses, when available. Needs new routine where one can
- + specify the source section of the symbol to be printed as well as some
- + rewrite of the disassemble functions.
- +
- +*/
- +
- +#include "bfd.h"
- +#include "bfdlink.h"
- +#include "sysdep.h"
- +#include "genlink.h"
- +#include "libbfd.h"
- +#include "libamiga.h"
- +
- +#ifndef alloca
- +extern PTR alloca ();
- +#endif
- +
- +typedef struct aout_symbol {
- + asymbol symbol;
- + short desc;
- + char other;
- + unsigned char type;
- +} aout_symbol_type;
- +
- +#include "aout/aout64.h"
- +
- +typedef struct amiga_ardata_struct {
- + /* generic stuff */
- + struct artdata generic;
- + /* amiga-specific stuff */
- + unsigned long filesize;
- + struct arch_syms *defsyms;
- + unsigned long defsym_count;
- +} amiga_ardata_type;
- +
- +#define amiga_ardata(abfd) (*(struct amiga_ardata_struct **)&(abfd)->tdata.aout_ar_data)
- +
- +#define GL(x) bfd_get_32 (abfd, (bfd_byte *) (x))
- +#define GW(x) bfd_get_16 (abfd, (bfd_byte *) (x))
- +#define LONGSIZE(l) (((l)+3) >> 2)
- +
- +#define DEBUG_AMIGA 10000
- +
- +static long determine_datadata_relocs PARAMS ((bfd *, asection *));
- +static bfd_boolean amiga_write_section_contents PARAMS ((bfd *, asection *,
- + asection *, long, long*));
- +static bfd_boolean amiga_write_symbols PARAMS ((bfd *, asection *));
- +static bfd_boolean amiga_digest_file PARAMS ((bfd *));
- +static bfd_boolean amiga_mkobject PARAMS ((bfd *));
- +static bfd_boolean amiga_mkarchive PARAMS ((bfd *));
- +static bfd_boolean amiga_read_unit PARAMS ((bfd *, unsigned long));
- +static bfd_boolean amiga_read_load PARAMS ((bfd *));
- +static bfd_boolean amiga_handle_cdb_hunk PARAMS ((bfd *, unsigned long,
- + unsigned long, int,
- + unsigned long));
- +static bfd_boolean amiga_handle_rest PARAMS ((bfd *,asection *,bfd_boolean));
- +static bfd_boolean write_name PARAMS ((bfd*, const char*, long));
- +
- +/* AmigaOS doesn't like symbols names longer than 124 characters */
- +#define MAX_NAME_SIZE 124
- +
- +extern int amiga_pOS_flg;
- +
- +#if DEBUG_AMIGA
- +#include <stdarg.h>
- +static void
- +error_print(const char *fmt,...)
- +{
- + va_list args;
- +
- + va_start (args, fmt);
- + vfprintf (stderr, fmt, args);
- + va_end (args);
- +}
- +
- +#define DPRINT(L,x) if (L>=DEBUG_AMIGA) error_print x
- +#else
- +#define DPRINT(L,x)
- +#endif
- +
- +reloc_howto_type howto_hunk_reloc8 =
- +{
- + HUNK_RELOC8, /* type */
- + 0, /* rightshift */
- + 0, /* size */
- + 8, /* bitsize */
- + TRUE, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + 0, /* special_function */
- + "reloc8", /* textual name */
- + FALSE, /* partial_inplace? */
- + 0x000000ff, /* src_mask */
- + 0x000000ff, /* dst_mask */
- + TRUE /* pcrel_offset */
- +};
- +
- +reloc_howto_type howto_hunk_reloc16 =
- +{HUNK_RELOC16,0,1,16,TRUE,0,complain_overflow_bitfield,0,"reloc16",FALSE,0x0000ffff,0x0000ffff,TRUE};
- +
- +reloc_howto_type howto_hunk_reloc32 =
- +{HUNK_RELOC32,0,2,32,TRUE,0,complain_overflow_bitfield,0,"reloc32",FALSE,0xffffffff,0xffffffff,TRUE};
- +
- +reloc_howto_type howto_hunk_drel8 =
- +{HUNK_DREL8,0,0,8,FALSE,0,complain_overflow_bitfield,0,"drel8",FALSE,0x000000ff,0x000000ff,FALSE};
- +
- +reloc_howto_type howto_hunk_drel16 =
- +{HUNK_DREL16,0,1,16,FALSE,0,complain_overflow_bitfield,0,"drel16",FALSE,0x0000ffff,0x0000ffff,FALSE};
- +
- +reloc_howto_type howto_hunk_drel32 =
- +{HUNK_DREL32,0,2,32,FALSE,0,complain_overflow_bitfield,0,"drel32",FALSE,0xffffffff,0xffffffff,FALSE};
- +
- +reloc_howto_type *amiga_howto_array[2][3] =
- +{
- + { &howto_hunk_reloc8, &howto_hunk_reloc16, &howto_hunk_reloc32 },
- + { &howto_hunk_drel8, &howto_hunk_drel16, &howto_hunk_drel32 }
- +};
- +
- +/* The following are gross hacks that need to be fixed. The problem is
- + that the linker unconditionally references these values without
- + going through any of bfd's standard interface. Thus they need to
- + be defined in a bfd module that is included in *all* configurations,
- + and are currently in bfd.c, otherwise linking the linker will fail
- + on non-Amiga target configurations. */
- +/* This one is used by the linker and tells us, if a debug hunk should be
- + written out*/
- +extern int write_debug_hunk;
- +/* This is also used by the linker to set the attribute of sections */
- +extern int amiga_attribute;
- +
- +static bfd_boolean
- +get_long (abfd, n)
- + bfd *abfd;
- + unsigned long *n;
- +{
- + if (bfd_bread ((PTR)n, sizeof (*n), abfd) != sizeof (*n))
- + return FALSE;
- + *n = GL (n);
- + return TRUE;
- +}
- +
- +static const struct bfd_target *
- +amiga_object_p (abfd)
- + bfd *abfd;
- +{
- + char buf[8];
- + unsigned int x;
- + struct stat stat_buffer;
- +
- + /* An Amiga object file must be at least 8 bytes long. */
- + if (bfd_bread ((PTR) buf, 8, abfd) != 8)
- + {
- + bfd_set_error(bfd_error_wrong_format);
- + return 0;
- + }
- +
- + bfd_seek (abfd, 0, SEEK_SET);
- +
- + /* Does it look like an Amiga object file? */
- + x = GL(buf);
- + if ((x != HUNK_UNIT) && (x != HUNK_HEADER) && (x != HUNK_HEADER_POS))
- + {
- + /* Not an Amiga file. */
- + bfd_set_error(bfd_error_wrong_format);
- + return 0;
- + }
- +
- + /* Can't fail and return (but must be declared boolean to suit
- + other bfd requirements). */
- + (void) amiga_mkobject (abfd);
- +
- + AMIGA_DATA(abfd)->IsLoadFile = (x == HUNK_HEADER || x == HUNK_HEADER_POS);
- +
- + if (!amiga_digest_file (abfd))
- + {
- + /* Something went wrong. */
- + DPRINT (20,("bfd parser stopped at offset 0x%lx\n", bfd_tell (abfd)));
- + return (const struct bfd_target *) 0;
- + }
- +
- + /* Set default architecture to m68k:68000. */
- + /* So we can link on 68000 AMIGAs..... */
- + abfd->arch_info = bfd_scan_arch ("m68k:68000");
- +
- + return (abfd->xvec);
- +}
- +
- +/* Skip over the hunk length longword + the number of longwords given there. */
- +#define next_hunk(abfd) \
- + { AMIGA_DATA(abfd)->file_pointer += 1 + GL(AMIGA_DATA(abfd)->file_pointer); }
- +
- +static asection *
- +amiga_get_section_by_hunk_number (abfd, hunk_number)
- + bfd *abfd;
- + long hunk_number;
- +{
- + /* A cache, so we don't have to search the entire list every time. */
- + static asection *last_reference;
- + static bfd *last_bfd;
- + asection *p;
- +
- + switch(hunk_number)
- + {
- + case -1:
- + return bfd_abs_section_ptr;
- + break;
- + case -2:
- + return bfd_und_section_ptr;
- + break;
- + case -3:
- + return bfd_com_section_ptr;
- + break;
- + default:
- + if (last_reference)
- + if (last_bfd == abfd && last_reference->target_index == hunk_number)
- + return last_reference;
- + for (p = abfd->sections; p != NULL; p = p->next)
- + if (p->target_index == hunk_number)
- + {
- + last_reference = p;
- + last_bfd = abfd;
- + return p;
- + }
- + BFD_FAIL();
- + break;
- + }
- + return (asection *) 0;
- +}
- +
- +static bfd_boolean
- +amiga_add_reloc (abfd, section, offset, symbol, howto, target_hunk)
- + bfd *abfd;
- + asection *section;
- + bfd_size_type offset;
- + amiga_symbol_type * symbol;
- + reloc_howto_type *howto;
- + long target_hunk;
- +{
- + amiga_reloc_type *reloc;
- + static int count;
- + asection *target_sec;
- +
- + reloc = (amiga_reloc_type *) bfd_zalloc (abfd, sizeof (amiga_reloc_type));
- + reloc->next = 0;
- +
- + if (!reloc)
- + {
- + bfd_set_error (bfd_error_no_memory);
- + return(FALSE);
- + }
- +
- + abfd -> flags |= HAS_RELOC;
- + section -> flags |= SEC_RELOC;
- +
- + if (amiga_per_section(section)->reloc_tail)
- + amiga_per_section(section)->reloc_tail->next = reloc;
- + else
- + section->relocation = (struct reloc_cache_entry *) reloc;
- + amiga_per_section(section)->reloc_tail = reloc;
- + reloc->next = NULL;
- + reloc->relent.address = offset;
- + reloc->relent.addend = 0;
- + reloc->relent.howto = howto;
- +
- + if (symbol==NULL) { /* relative to section */
- + target_sec = amiga_get_section_by_hunk_number (abfd, target_hunk);
- + if (target_sec)
- + reloc->symbol = (amiga_symbol_type *)target_sec->symbol;
- + else
- + return FALSE;
- + }
- + else
- + reloc->symbol = symbol;
- + reloc->relent.sym_ptr_ptr=(asymbol **)(&(reloc->symbol));
- + reloc->target_hunk = target_hunk;
- +
- + return TRUE;
- +}
- +
- +/* BFD doesn't currently allow multiple sections with the same
- + name, so we try a little harder to get a unique name. */
- +asection *
- +amiga_make_unique_section (abfd, name)
- + bfd *abfd;
- + CONST char *name;
- +{
- + asection *section;
- +
- + bfd_set_error (bfd_error_no_error);
- + section = bfd_make_section (abfd, name);
- + if (!section && (bfd_get_error() == bfd_error_no_error))
- + {
- +#if 0
- + int i = 1;
- + char *new_name;
- +
- + new_name = bfd_alloc (abfd, strlen(name) + 4);
- +
- + /* We try to come up with an original name (since BFD
- + currently requires all sections to have different names). */
- + while (!section && (i<=99))
- + {
- + sprintf (new_name, "%s_%u", name, i++);
- + section = bfd_make_section (abfd, new_name);
- + }
- +#else
- + section = bfd_make_section_anyway (abfd, name);
- +#endif
- + }
- + return section;
- +}
- +
- +
- +
- +#if DEBUG_AMIGA
- +#define DPRINTHUNK(x) fprintf (stderr,"Processing %s hunk (0x%x)...",\
- + (x) == HUNK_UNIT ? "HUNK_UNIT" :\
- + (x) == HUNK_NAME ? "HUNK_NAME" :\
- + (x) == HUNK_DEBUG ? "HUNK_DEBUG" :\
- + (x) == HUNK_OVERLAY ? "HUNK_OVERLAY" :\
- + (x) == HUNK_BREAK ? "HUNK_BREAK" :\
- + (x) == HUNK_HEADER ? "HUNK_HEADER" :\
- + (x) == HUNK_HEADER_POS ? "HUNK_HEADER_POS" :\
- + (x) == HUNK_CODE ? "HUNK_CODE" :\
- + (x) == HUNK_DATA ? "HUNK_DATA" :\
- + (x) == HUNK_BSS ? "HUNK_BSS" :\
- + (x) == HUNK_RELOC8 ? "HUNK_RELOC8" :\
- + (x) == HUNK_RELOC16 ? "HUNK_RELOC16" :\
- + (x) == HUNK_RELOC32 ? "HUNK_RELOC32" :\
- + (x) == HUNK_DREL8 ? "HUNK_DREL8" :\
- + (x) == HUNK_DREL16 ? "HUNK_DREL16" :\
- + (x) == HUNK_DREL32 ? "HUNK_DREL32" :\
- + (x) == HUNK_SYMBOL ? "HUNK_SYMBOL" :\
- + (x) == HUNK_EXT ? "HUNK_EXT" :\
- + (x) == HUNK_END ? "HUNK_END" :\
- + (x) == HUNK_LIB ? "HUNK_LIB" :\
- + (x) == HUNK_INDEX ? "HUNK_INDEX" :\
- + "*unknown*",(x))
- +#define DPRINTHUNKEND fprintf(stderr,"...done\n")
- +#else
- +#define DPRINTHUNK(x)
- +#define DPRINTHUNKEND
- +#endif
- +
- +#define STRSZ_BLOCK 4096
- +#define CARSYM_BLOCK 200
- +
- +static bfd_boolean
- +parse_archive_units (abfd, n_units, filesize, one, syms, symcount)
- + bfd *abfd;
- + int *n_units;
- + unsigned long filesize;
- + bfd_boolean one; /* parse only the first unit ? */
- + struct arch_syms **syms;
- + symindex *symcount;
- +{
- + unsigned long hunk_type,pos,no,hunk,len,n;
- + long section_idx=-1;
- + symindex defsymcount=0;
- + unsigned long str_size=0, str_tot_size=0;
- + char *strings = NULL;
- + unsigned long unit_offset, defsym_pos=0;
- + struct arch_syms *nsyms, *syms_tail=NULL;
- +
- + *n_units = 0;
- + while (get_long (abfd, &hunk_type)) {
- + switch (hunk_type) {
- + case HUNK_UNIT:
- + unit_offset = bfd_tell (abfd)-4;
- + (*n_units)++;
- + if (one && *n_units>1) {
- + bfd_seek (abfd, -4, SEEK_CUR);
- + return TRUE;
- + }
- + if (get_long (abfd, &len) && !bfd_seek (abfd, len<<2, SEEK_CUR)) {
- + section_idx = -1;
- + }
- + else
- + return FALSE;
- + break;
- + case HUNK_DEBUG:
- + case HUNK_NAME:
- + if (!(get_long (abfd, &len) && !bfd_seek (abfd, len<<2, SEEK_CUR)))
- + return FALSE;
- + break;
- + case HUNK_CODE:
- + case HUNK_DATA:
- + section_idx++;
- + if (!(get_long (abfd, &len) && !bfd_seek (abfd, (len&0x3fffffff)<<2,
- + SEEK_CUR)))
- + return FALSE;
- + break;
- + case HUNK_BSS:
- + section_idx++;
- + if (!get_long (abfd, &len))
- + return FALSE;
- + break;
- + case HUNK_RELOC8:
- + case HUNK_RELOC16:
- + case HUNK_RELOC32:
- + if (!get_long (abfd, &no))
- + return FALSE;
- + while (no) {
- + /* destination hunk */
- + if (!get_long (abfd, &hunk))
- + return FALSE;
- + /* skip the offsets */
- + if (bfd_seek (abfd, no<<2, SEEK_CUR))
- + return FALSE;
- + /* read the number of offsets to come */
- + if (!get_long (abfd, &no))
- + return FALSE;
- + }
- + break;
- + case HUNK_END:
- + break;
- + case HUNK_DREL8:
- + case HUNK_DREL16:
- + case HUNK_DREL32:
- + fprintf (stderr, "hunk_drelx not supported yet\n");
- + return FALSE;
- + case HUNK_SYMBOL:
- + if (!get_long (abfd, &len))
- + return FALSE;
- + while (len) {
- + if (bfd_seek (abfd, (len+1)<<2, SEEK_CUR))
- + return FALSE;
- + if (!get_long (abfd, &len))
- + return FALSE;
- + }
- + break;
- + case HUNK_EXT:
- + defsym_pos = 0;
- + if (!get_long (abfd, &n))
- + return FALSE;
- + while (n != 0) {
- + unsigned long tmp, type;
- +
- + len = n & 0xffffff;
- + type = (n>>24) & 0xff;
- + switch (type) {
- + case EXT_SYMB:
- + case EXT_DEF:
- + case EXT_ABS:
- + /* retain the positions of defined symbols for each object
- + in the archive. They'll be used later to build a
- + pseudo-armap, which _bfd_generic_link_add_archive_symbols
- + needs */
- + if (defsym_pos==0)
- + defsym_pos = bfd_tell (abfd)-4;
- + /* skip name & value */
- + if (bfd_seek (abfd, (len+1)<<2, SEEK_CUR))
- + return FALSE;
- + defsymcount++;
- + break;
- +
- + case EXT_REF8:
- + case EXT_REF16:
- + case EXT_REF32:
- + case EXT_DEXT8:
- + case EXT_DEXT16:
- + case EXT_DEXT32:
- + /* skip name */
- + if (bfd_seek (abfd, len<<2, SEEK_CUR))
- + return FALSE;
- +
- + if (!get_long (abfd, &no))
- + return FALSE;
- + if (no)
- + if (bfd_seek (abfd, no<<2, SEEK_CUR))
- + return FALSE;
- + break;
- +
- + case EXT_COMMON:
- + /* skip name */
- + if (bfd_seek (abfd, len<<2, SEEK_CUR))
- + return FALSE;
- + /* size of common block */
- + if (!get_long (abfd, &len))
- + return FALSE;
- + /* number of references */
- + if (!get_long (abfd, &no))
- + return FALSE;
- + /* skip references */
- + if (no)
- + if (bfd_seek (abfd, no<<2, SEEK_CUR))
- + return FALSE;
- + break;
- +
- + default: /* error */
- + fprintf (stderr, "unexpected type in hunk_ext at offset 0x%lx\n",
- + bfd_tell (abfd));
- + return FALSE;
- + }
- +
- + if (!get_long (abfd, &n))
- + return FALSE;
- + }
- + if (defsym_pos != 0 && syms) {
- + /* there are some defined symbols, keep enough information on
- + them to simulate an armap later on */
- + nsyms = (struct arch_syms*) bfd_alloc (abfd, sizeof (struct arch_syms));
- + nsyms->next = NULL;
- + if (syms_tail)
- + syms_tail->next = nsyms;
- + else
- + *syms = nsyms;
- + syms_tail = nsyms;
- + nsyms->offset = defsym_pos;
- + nsyms->size = bfd_tell (abfd) - defsym_pos;
- + nsyms->unit_offset = unit_offset;
- + }
- + break; /* of HUNK_EXT */
- +
- + default:
- +#if 0
- + fprintf (stderr, "unexpected hunk 0x%lx at offset 0x%lx\n",
- + hunk_type, bfd_tell (abfd));
- +#endif
- + return FALSE;
- + }
- + }
- + if (syms && symcount)
- + *symcount = defsymcount;
- + return (bfd_tell (abfd) == filesize);
- +}
- +
- +static bfd_boolean
- +amiga_digest_file (abfd)
- + bfd *abfd;
- +{
- + amiga_data_type *amiga_data = AMIGA_DATA(abfd);
- + unsigned long hunk_type,pos;
- + struct stat stat_buffer;
- +
- + if (bfd_bread ((PTR) &hunk_type, 4, abfd) != 4)
- + {
- + bfd_set_error (bfd_error_wrong_format);
- + return FALSE;
- + }
- +
- + if (bfd_stat (abfd, &stat_buffer) < 0)
- + return FALSE;
- +
- + hunk_type = HUNK_VALUE(GL(&hunk_type));
- +
- + switch (hunk_type)
- + {
- + case HUNK_UNIT:
- + /* Read the unit(s) */
- +/*
- + while ((pos=bfd_tell (abfd)) < stat_buffer.st_size)
- + {
- +*/
- + if (!amiga_read_unit (abfd, stat_buffer.st_size - abfd->origin))
- + return FALSE;
- + if (abfd->arelt_data)
- + arelt_size (abfd) = bfd_tell (abfd);
- +/* }*/
- + break;
- +
- + case HUNK_HEADER:
- + case HUNK_HEADER_POS:
- + /* This is a load file */
- + if (!amiga_read_load (abfd))
- + return(FALSE);
- + break;
- + }
- +
- + return TRUE;
- +}/* of amiga_digest_file */
- +
- +
- +/* Read in Unit file */
- +/* file pointer is located after the HUNK_UNIT LW */
- +static bfd_boolean
- +amiga_read_unit (abfd, size)
- + bfd *abfd;
- + unsigned long size;
- +{
- + amiga_data_type *amiga_data = AMIGA_DATA(abfd);
- + unsigned long hunk_type, hunk_number=0;
- + unsigned long sz;
- + unsigned long buf[2];
- +
- + /* read LW length of unit's name */
- + if (bfd_bread (buf, sizeof (buf[0]), abfd) != sizeof (buf[0]))
- + return FALSE;
- +
- + /* and skip it (FIXME maybe) */
- + if (bfd_seek (abfd, GL(buf)<<2, SEEK_CUR))
- + return FALSE;
- +
- + while (bfd_tell (abfd) < size)
- + {
- + if (!get_long (abfd, &hunk_type))
- + return FALSE;
- +
- + /* Now there may be CODE, DATA, BSS, SYMBOL, DEBUG, RELOC Hunks */
- + hunk_type = HUNK_VALUE (hunk_type);
- +
- + switch(hunk_type)
- + {
- + case HUNK_UNIT:
- + /* next unit, seek back and return */
- + return (bfd_seek (abfd, -4, SEEK_CUR) == 0);
- +
- + case HUNK_DEBUG:
- + /* we don't parse hunk_debug at the moment */
- + if (!get_long (abfd, &sz) || bfd_seek (abfd, sz<<2, SEEK_CUR))
- + return FALSE;
- + break;
- +
- + case HUNK_NAME:
- + case HUNK_CODE:
- + case HUNK_DATA:
- + case HUNK_BSS:
- + /* Handle this hunk, including relocs, etc.
- + The finishing HUNK_END is consumed by the routine
- + */
- + if (!amiga_handle_cdb_hunk (abfd, hunk_type, hunk_number++,
- + 0, -1))
- + return FALSE;
- +
- + break;
- +
- + default:
- + /* Something very nasty happened:
- + Illegal Hunk occured....
- + */
- + bfd_set_error (bfd_error_wrong_format);
- + return FALSE;
- + break;
- + }/* Of switch hunk_type */
- +
- + /* Next hunk */
- + }
- + return TRUE;
- +}
- +
- +
- +/* Read a load file */
- +static bfd_boolean
- +amiga_read_load (abfd)
- + bfd *abfd;
- +{
- + amiga_data_type *amiga_data = AMIGA_DATA(abfd);
- + unsigned long *hunk_attributes, *hunk_sizes;
- + int hunk_number=0;
- + int hunk_type;
- + unsigned long max_hunk_number;
- + int i,n;
- + unsigned long buf[4];
- +
- + /* Read hunk lengths (and memory attributes...) */
- + /* Read in each hunk */
- +
- + if (bfd_bread (buf, sizeof(*buf) * 4, abfd) != 4 * sizeof (*buf))
- + return FALSE;
- +
- + /* If there are resident libs: abort (obsolete feature) */
- + if (GL(buf) != 0)
- + return FALSE;
- +
- + max_hunk_number = GL(buf+1);
- +
- + /* Sanity */
- + if (max_hunk_number<1)
- + {
- + bfd_set_error (bfd_error_wrong_format);
- + return FALSE;
- + }
- +
- + amiga_data->nb_hunks = max_hunk_number;
- +
- + /* Num of root hunk must be 0 */
- + if (GL(buf+2)!=0)
- + {
- + bfd_set_error (bfd_error_wrong_format);
- + return FALSE;
- + }
- +
- + /* Num of last hunk must be mhn-1 */
- + if (GL(buf+3) != max_hunk_number-1)
- + {
- + fprintf (stderr, "Overlay loadfiles are not supported\n");
- + bfd_set_error (bfd_error_wrong_format);
- + return FALSE;
- + }
- +
- + hunk_sizes = alloca (max_hunk_number * sizeof (unsigned long));
- + hunk_attributes = alloca (max_hunk_number * sizeof (unsigned long));
- +
- + if (hunk_sizes == NULL || hunk_attributes == NULL)
- + {
- + bfd_set_error (bfd_error_no_memory);
- + return FALSE;
- + }
- +
- + if (bfd_bread (hunk_sizes, sizeof (unsigned long) * max_hunk_number, abfd) !=
- + max_hunk_number * sizeof (unsigned long))
- + return FALSE;
- +
- + /* Now, read in sizes and memory attributes */
- + for (i=0; i<max_hunk_number; i++)
- + {
- + /* convert to host format */
- + hunk_sizes[i] = GL(hunk_sizes+i);
- + switch (HUNK_ATTRIBUTE (hunk_sizes[i]))
- + {
- + case HUNK_ATTR_CHIP:
- + hunk_attributes[i] = MEMF_CHIP;
- + break;
- + case HUNK_ATTR_FAST:
- + hunk_attributes[i] = MEMF_FAST;
- + break;
- + case HUNK_ATTR_FOLLOWS:
- + if (!get_long (abfd, &hunk_attributes[i]))
- + return FALSE;
- + break;
- + default:
- + hunk_attributes[i] = 0;
- + break;
- + }
- + hunk_sizes[i] = (HUNK_VALUE (hunk_sizes[i]))<<2;
- + }
- +
- + for (hunk_number=0; hunk_number < max_hunk_number; hunk_number++)
- + {
- + if (bfd_bread (buf, sizeof(*buf), abfd) != sizeof(*buf))
- + return FALSE;
- + hunk_type = HUNK_VALUE (GL(buf));
- +
- + /* This may be HUNK_NAME, CODE, BSS, DEBUG, DATA */
- + switch(hunk_type)
- + {
- + case HUNK_NAME:
- + case HUNK_CODE:
- + case HUNK_DATA:
- + case HUNK_BSS:
- + case HUNK_DEBUG:
- + if (!amiga_handle_cdb_hunk (abfd, hunk_type, hunk_number,
- + hunk_attributes[hunk_number],
- + hunk_sizes[hunk_number]))
- + {
- + bfd_set_error (bfd_error_wrong_format);
- + return FALSE;
- + }
- + break;
- +
- + default:
- + /* illegal hunk */
- + bfd_set_error (bfd_error_wrong_format);
- + return FALSE;
- + break;
- + }/* Of switch */
- + }
- +
- + return TRUE;
- +}/* Of amiga_read_load */
- +
- +
- +/* Handle NAME, CODE, DATA, BSS, DEBUG Hunks */
- +static bfd_boolean
- +amiga_handle_cdb_hunk (abfd, hunk_type, hunk_number, hunk_attribute,
- + hunk_size)
- + bfd *abfd;
- + unsigned long hunk_type;
- + unsigned long hunk_number;
- + int hunk_attribute;
- + unsigned long hunk_size;
- +/* If hunk_size==-1, then we are digesting a HUNK_UNIT */
- +{
- + amiga_data_type *amiga_data = AMIGA_DATA(abfd);
- + char *current_name=NULL;
- + unsigned long len;
- + asection *current_section=NULL;
- + int is_load = (hunk_size!=-1);
- + unsigned long buf[6];
- + int secflags;
- +
- + if (hunk_type==HUNK_NAME) /* get name */
- + {
- + if (!get_long (abfd, &len))
- + return FALSE;
- + len = (HUNK_VALUE (len)) << 2;
- + current_name = bfd_alloc (abfd, len+1);
- + if (!current_name)
- + return FALSE;
- +
- + if (bfd_bread (current_name, len, abfd) != len)
- + return FALSE;
- +
- + current_name [len] = '\0';
- +
- + if (!get_long (abfd, &hunk_type))
- + return FALSE;
- +
- + }
- + else /* Set curent name to something appropriate */
- + current_name=(hunk_type==HUNK_CODE)?".text":
- + (hunk_type==HUNK_BSS)?".bss":".data";
- +
- + /* file_pointer is now after hunk_type */
- + secflags = 0;
- + switch (hunk_type)
- + {
- + case HUNK_CODE:
- + secflags = SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS;
- + goto do_section;
- +
- + case HUNK_DATA:
- + secflags = SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_HAS_CONTENTS;
- + goto do_section;
- +
- + case HUNK_BSS:
- + secflags = SEC_ALLOC;
- +
- + do_section:
- + if (!get_long (abfd, &len))
- + return FALSE;
- + len = HUNK_VALUE (len)<<2; /* Length of section */
- + if (!is_load)
- + {
- + hunk_attribute = HUNK_ATTRIBUTE (len);
- + hunk_attribute=(hunk_attribute==HUNK_ATTR_CHIP)?MEMF_CHIP:
- + (hunk_attribute==HUNK_ATTR_FAST)?MEMF_FAST:0;
- + }
- +
- + /* Make new section */
- + current_section = amiga_make_unique_section (abfd, current_name);
- + if (!current_section)
- + return FALSE;
- +
- + current_section->filepos = bfd_tell (abfd);
- + /* For a loadfile, the section size in memory comes from the
- + hunk header. The size on disk may be smaller. */
- + current_section->_cooked_size = current_section->_raw_size =
- + ((hunk_size==-1) ? len : hunk_size);
- + current_section->target_index = hunk_number;
- + bfd_set_section_flags (abfd, current_section, secflags);
- +
- + amiga_per_section(current_section)->disk_size = len; /* size on disk */
- + amiga_per_section(current_section)->attribute = hunk_attribute;
- +
- + /* skip the contents */
- + if ((secflags & SEC_HAS_CONTENTS) && bfd_seek (abfd, len, SEEK_CUR))
- + return FALSE;
- +
- + if (!amiga_handle_rest (abfd, current_section, is_load))
- + return FALSE;
- + break;
- +
- + /* Currently, there is one debug hunk per executable, instead of
- + one per unit as it would with a "standard" amigaos
- + implementation. So the debug hunk is at the same level as
- + code/data/bss. This will change in the future */
- + case HUNK_DEBUG:
- + /* format of gnu debug hunk is:
- + HUNK_DEBUG
- + N
- + 0413.L Magic number
- + symtabsize
- + strtabsize
- + symtabdata [length=symtabsize]
- + strtabdata [length=strtabsize]
- + [pad bytes]
- + */
- +
- + /* read LW length */
- + if (bfd_bread (buf, sizeof(*buf), abfd) != sizeof (*buf))
- + return FALSE;
- +
- + len = GL (buf) << 2;
- + if (len > 5*sizeof(long))
- + {
- + if (bfd_bread (buf, sizeof(*buf) * 6, abfd) != 6*sizeof(*buf))
- + return FALSE;
- +
- + if (GL(buf) == 0413) /* GNU DEBUG HUNK */
- + {
- + /*FIXME: we should add the symbols in the debug hunk to symtab... */
- + amiga_data->symtab_size = GL(buf+1);
- + amiga_data->stringtab_size = GL(buf+2);
- + adata(abfd).sym_filepos = bfd_tell (abfd);
- + adata(abfd).str_filepos = adata(abfd).sym_filepos +
- + amiga_data->symtab_size;
- + len -= 5*sizeof(long);
- + }
- + }
- + if (bfd_seek (abfd, len, SEEK_CUR))
- + return FALSE;
- + break;
- +
- + default:
- + bfd_set_error (bfd_error_wrong_format);
- + return FALSE;
- + break;
- + } /* switch (hunk_type) */
- +
- + return TRUE;
- +
- +} /* Of amiga_handle_cdb_hunk */
- +
- +
- +/* Handle rest of a hunk
- + I.e.: Relocs, EXT, SYMBOLS... */
- +static bfd_boolean
- +amiga_handle_rest (abfd, current_section, isload)
- + bfd *abfd;
- + asection *current_section;
- + bfd_boolean isload;
- +{
- + amiga_data_type *amiga_data = AMIGA_DATA(abfd);
- + unsigned long hunk_type, type, len, n;
- + long tmp;
- + unsigned long **p, no, *countptr;
- + struct amiga_raw_symbol *sp=NULL;
- + unsigned long buf[5];
- + file_ptr filepos;
- + amiga_per_section_type *asect = amiga_per_section (current_section);
- +
- + while (1)
- + {
- + if (!get_long (abfd, &hunk_type))
- + return FALSE;
- + switch (hunk_type)
- + {
- + case HUNK_END:
- + return TRUE;
- + break;
- +
- + case HUNK_RELOC8:
- + asect->raw_relocs8 = bfd_tell (abfd)-4;
- + countptr = &asect->num_raw_relocs8;
- + goto rel;
- + case HUNK_RELOC16:
- + asect->raw_relocs16 = bfd_tell (abfd)-4;
- + countptr = &asect->num_raw_relocs16;
- + goto rel;
- + case HUNK_RELOC32:
- + asect->raw_relocs32 = bfd_tell (abfd)-4;
- + countptr = &asect->num_raw_relocs32;
- + goto rel;
- + case HUNK_DREL8:
- + fprintf (stderr, "hunk_drel8 not supported yet\n");
- + return FALSE;
- + case HUNK_DREL16:
- + fprintf (stderr, "hunk_drel16 not supported yet\n");
- + return FALSE;
- + case HUNK_DREL32:
- + fprintf (stderr, "hunk_drel32 not supported yet\n");
- + return FALSE;
- + rel:
- + current_section->flags |= SEC_RELOC;
- + abfd->flags |= HAS_RELOC;
- +
- + /* read the first number of relocs */
- + if (!get_long (abfd, &no))
- + return FALSE;
- +
- + /* count and skip them */
- + while (no != 0)
- + {
- + current_section->reloc_count += no;
- + (*countptr) += no;
- + if (bfd_seek (abfd, (no+1)<<2, SEEK_CUR))
- + return FALSE;
- + if (!get_long (abfd, &no))
- + return FALSE;
- + }
- + break;
- +
- + case HUNK_SYMBOL:
- + /* In a unit, we ignore these, since all symbol information
- + comes with HUNK_EXT, in a load file, these are added */
- + if (!isload)
- + {
- + amiga_per_section(current_section)->hunk_symbol_pos =
- + bfd_tell (abfd);
- + /* size of first symbol */
- + if (bfd_bread (buf, sizeof(*buf), abfd) != sizeof (*buf))
- + return FALSE;
- + while (GL(buf) != 0) /* until size is 0 */
- + {
- + /* skip the name */
- + if (bfd_seek (abfd, (GL(buf)+1)<<2, SEEK_CUR))
- + return FALSE;
- + /* read the size */
- + if (bfd_bread (buf, sizeof(*buf), abfd) != sizeof (*buf))
- + return FALSE;
- + }
- + break;
- + }
- + /* We add these, by falling through... */
- +
- + case HUNK_EXT:
- + /* We leave these alone, until they are requested by the user */
- + amiga_per_section(current_section)->hunk_ext_pos = bfd_tell (abfd);
- +
- + if (!get_long (abfd, &n))
- + return FALSE;
- + while (n != 0)
- + {
- + /* read the symbol type and length */
- + type = (n>>24) & 0xff;
- + len = n & 0xffffff;
- +
- + /* skip the symbol name */
- + if (bfd_seek (abfd, len<<2, SEEK_CUR))
- + return FALSE;
- +
- + switch(type)
- + {
- + case EXT_SYMB: /* Symbol hunks are relative to hunk start... */
- + case EXT_DEF: /* def relative to hunk */
- + case EXT_ABS: /* def absolute */
- + abfd->flags |= HAS_SYMS; /* We have symbols */
- + abfd->symcount++;
- + /* skip the value */
- + if (!get_long (abfd, &tmp))
- + return FALSE;
- + break;
- +
- + case EXT_REF8: /* 8 bit ref */
- + case EXT_REF16: /* 16 bit ref */
- + case EXT_REF32: /* 32 bit ref */
- + case EXT_DEXT8: /* 8 bit base relative ref */
- + case EXT_DEXT16: /* 16 bit " "*/
- + case EXT_DEXT32: /* 32 bit " " */
- + abfd->flags |= HAS_SYMS;
- + abfd->symcount++;
- + if (!get_long (abfd, &tmp))
- + return FALSE;
- + if (tmp)
- + {
- + abfd->flags|=HAS_RELOC;
- + current_section->flags|=SEC_RELOC;
- + current_section->reloc_count += tmp;
- + /* skip references */
- + if (bfd_seek (abfd, tmp<<2, SEEK_CUR))
- + return FALSE;
- + }
- + break;
- +
- + case EXT_COMMON: /* Common ref/def */
- + abfd->flags |= HAS_SYMS;
- + abfd->symcount++;
- + /* skip the size of common block: FIXME */
- + if (!get_long (abfd, &tmp))
- + return FALSE;
- + if (!get_long (abfd, &tmp))
- + return FALSE;
- + if (tmp)
- + {
- + abfd->flags |= HAS_RELOC;
- + current_section->flags |= SEC_RELOC;
- + current_section->reloc_count += tmp;
- + if (bfd_seek (abfd, tmp<<2, SEEK_CUR))
- + return FALSE;
- + }
- + break;
- +
- + default: /* error */
- + bfd_set_error (bfd_error_wrong_format);
- + return FALSE;
- + break;
- + }/* of switch type */
- +
- + if (!get_long (abfd, &n))
- + return FALSE;
- + }
- + break;
- +
- + /* If a debug hunk is found at this position, the file has
- + been generated by a third party tool and the debug info
- + here are useless to us. Just skip the hunk, then. */
- + case HUNK_DEBUG:
- + if (!get_long (abfd, &n) || bfd_seek (abfd, n<<2, SEEK_CUR))
- + return FALSE;
- + break;
- + default: /* error */
- + bfd_set_error (bfd_error_wrong_format);
- + return FALSE;
- + break;
- + }/* Of switch */
- + }/* of while */
- + return TRUE;
- +}/* of amiga_handle_rest*/
- +
- +static bfd_boolean
- +amiga_mkobject (abfd)
- + bfd *abfd;
- +{
- + struct amiga_data_struct *rawptr;
- +
- + rawptr = (struct amiga_data_struct *)
- + bfd_zalloc (abfd, sizeof (struct amiga_data_struct));
- + abfd->tdata.amiga_data = rawptr;
- + return rawptr != NULL;
- +}
- +
- +static bfd_boolean
- +amiga_mkarchive (abfd)
- + bfd *abfd;
- +{
- + amiga_ardata_type *ar;
- + ar = (amiga_ardata_type*) bfd_zalloc (abfd, sizeof (amiga_ardata_type));
- + amiga_ardata (abfd) = ar;
- + return (ar!=NULL);
- +}
- +
- +/* used with base relative linking */
- +extern int amiga_base_relative;
- +
- +/* used with -resident linking */
- +extern int amiga_resident;
- +
- +/* write nb long words (possibly swapped out) to the output file */
- +static bfd_boolean
- +write_longs (in, nb, abfd)
- + unsigned long *in;
- + long nb;
- + bfd *abfd;
- +{
- + unsigned long out [10];
- + int i;
- +
- + while (nb > 0)
- + {
- + for (i=0; i<nb && i<10; i++)
- + out[i] = GL (in++);
- + if (bfd_bwrite ((PTR)out, sizeof (long) * i, abfd) != sizeof(long)*i)
- + return FALSE;
- + nb -= 10;
- + }
- + return TRUE;
- +}
- +
- +static long
- +determine_datadata_relocs (abfd, section)
- + bfd *abfd;
- + asection *section;
- +{
- + long relocs = 1, i;
- + struct reloc_cache_entry *r;
- + asection *insection;
- + asymbol *sym_p;
- +
- + for (i=0;i<section->reloc_count;i++)
- + {
- + r=section->orelocation[i];
- + if (r == NULL)
- + continue;
- + sym_p=*(r->sym_ptr_ptr); /* The symbol for this section */
- + insection=sym_p->section;
- +
- + /* Is reloc relative to a special section ? */
- + if ((insection==bfd_abs_section_ptr)||(insection==bfd_com_section_ptr)||
- + (insection==bfd_und_section_ptr)||(insection==bfd_ind_section_ptr))
- + continue; /* Nothing to do, since this translates to HUNK_EXT */
- + if (insection->output_section == section)
- + relocs++;
- + }
- + return relocs;
- +}
- +
- +/* Adjust the indices map when we decide not to output the section <sec> */
- +static void
- +remove_section_index (sec, index_map)
- + asection *sec;
- + long *index_map;
- +{
- + int i = sec->index;
- + sec = sec->next;
- + index_map[i++] = -1;
- + while (sec!=NULL) {
- + (index_map[i++])--;
- + sec=sec->next;
- + }
- +}
- +
- +/* Write out the contents of a bfd */
- +static bfd_boolean
- +amiga_write_object_contents (abfd)
- + bfd *abfd;
- +{
- + struct amiga_data_struct *amiga_data=AMIGA_DATA(abfd);
- + sec_ptr p;
- + unsigned long n[5];
- + long i;
- + static const char zero[3]={0,0,0};
- + long datadata_relocs, bss_size = 0;
- + long *index_map;
- + asection *data_sec;
- +
- + /* Distinguish UNITS, LOAD Files
- + Write out hunks+relocs+HUNK_EXT+HUNK_DEBUG (GNU format)*/
- + DPRINT(5,("Entering write_object_conts\n"));
- +
- + abfd->output_has_begun=TRUE; /* Output has begun */
- +
- + index_map = bfd_alloc (abfd, abfd->section_count * sizeof (long));
- + if (!index_map)
- + return FALSE;
- +
- + for (i=0, p=abfd->sections; p!=NULL; p=p->next)
- + index_map[i++] = p->index;
- +
- + /* Distinguish Load files and Unit files */
- + if (amiga_data->IsLoadFile)
- + {
- + DPRINT(5,("Writing Load file\n"));
- +
- + /* Write out load file header */
- + if (amiga_pOS_flg)
- + n[0] = HUNK_HEADER_POS;
- + else
- + n[0] = HUNK_HEADER;
- + n[1] = n[2] = 0;
- + for (p=abfd->sections; p!=NULL; p=p->next) {
- + /* For baserel linking, don't remove the empty sections, since
- + they may get some contents later on */
- + if ((amiga_base_relative || p->_raw_size!=0 || p->_cooked_size!=0) &&
- + !(amiga_base_relative && !strcmp (p->name, ".bss")))
- + n[2]++;
- + else
- + remove_section_index (p, index_map);
- + }
- +
- + if (amiga_base_relative)
- + BFD_ASSERT(abfd->section_count==3);
- +
- + n[3]=0;
- + n[4]=n[2]-1;
- + if (!write_longs (n, 5, abfd))
- + return FALSE;
- +
- + /* Write out sizes and memory specifiers... */
- + /* We have to traverse the section list again, bad but no other way... */
- + if (amiga_base_relative) {
- + for (p=abfd->sections; p!=NULL; p=p->next)
- + {
- + if (amiga_resident && strcmp(p->name,".data")==0)
- + {
- + datadata_relocs = determine_datadata_relocs (abfd, p);
- + data_sec = p;
- + }
- + else if (strcmp(p->name,".bss")==0)
- + {
- + /* Get size for header*/
- + bss_size = p->_raw_size;
- + }
- + }
- + }
- +
- + for (p=abfd->sections; p!=NULL; p=p->next)
- + {
- + long extra = 0;
- +
- + if (index_map[p->index] < 0)
- + continue;
- + if (amiga_resident && (strcmp(p->name,".text")==0))
- + extra = datadata_relocs*4;
- + else {
- + if (amiga_base_relative && !strcmp (p->name, ".data"))
- + extra = bss_size;
- + }
- +
- + if (amiga_per_section(p)->disk_size == 0)
- + amiga_per_section(p)->disk_size = p->_raw_size;
- +
- + /* convert to a size in long words */
- + n[0] = LONGSIZE (p->_raw_size+extra);
- +
- + i=amiga_per_section(p)->attribute;
- + switch (i)
- + {
- + case MEMF_CHIP:
- + n[0]|=0x40000000;
- + i=1;
- + break;
- + case MEMF_FAST:
- + n[0]|=0x80000000;
- + i=1;
- + break;
- + case 0: /* nothing*/
- + i=1;
- + break;
- + default: /* Special one */
- + n[0]|=0xc0000000;
- + n[1]=i;
- + i=2;
- + break;
- + }/* Of switch */
- +
- + if (!write_longs (n, i, abfd))
- + return FALSE;
- + }/* Of for */
- + }
- + else
- + {/* Unit , no base-relative linking here.... */
- + int len = strlen (abfd->filename);
- + /* Write out unit header */
- + DPRINT(5,("Writing Unit\n"));
- +
- + n[0]=HUNK_UNIT;
- + if (!write_longs (n, 1, abfd))
- + return FALSE;
- +
- + i = LONGSIZE (len);
- + if (!write_name (abfd, abfd->filename, 0))
- + return FALSE;
- + }
- +
- + /* Write out every section */
- + for (p=abfd->sections; p!=NULL; p=p->next)
- + {
- + if (index_map[p->index] < 0)
- + continue;
- + if (amiga_per_section(p)->disk_size == 0)
- + amiga_per_section(p)->disk_size = p->_raw_size;
- +
- + if (amiga_resident && (strcmp(p->name,".text")==0))
- + {
- + if (!amiga_write_section_contents (abfd,p,data_sec,datadata_relocs,
- + index_map))
- + return FALSE;
- + }
- + else if (amiga_base_relative && (strcmp(p->name,".data")==0))
- + {
- + if (!amiga_write_section_contents (abfd,p,0,0,index_map))
- + return FALSE;
- + }
- + else
- + {
- + if (!amiga_write_section_contents (abfd,p,0,0,index_map))
- + return FALSE;
- + }
- +
- + if (!amiga_write_symbols(abfd,p)) /* Write out symbols, incl HUNK_END */
- + return FALSE;
- +
- + }/* of for sections */
- +
- + /* Write out debug hunk, if requested */
- + if (amiga_data->IsLoadFile /*&& write_debug_hunk*/)
- + {
- + extern bfd_boolean
- + translate_to_native_sym_flags (bfd*, asymbol*, struct external_nlist*);
- +
- + /* We have to convert all the symbols in abfd to a.out style.... */
- + struct external_nlist data;
- + int str_size, offset = 4;
- + int symbols = 0;
- + asymbol *sym;
- + asection *s;
- +
- + if (abfd->symcount)
- + {
- + /* Now, set the .text, .data and .bss fields in the tdata
- + struct (because translate_to_native_sym_flags needs
- + them... */
- + for (i=0,s=abfd->sections;s!=NULL;s=s->next)
- + if (strcmp(s->name,".text")==0)
- + {
- + i|=1;
- + adata(abfd).textsec=s;
- + }
- + else if (strcmp(s->name,".data")==0)
- + {
- + i|=2;
- + adata(abfd).datasec=s;
- + }
- + else if (strcmp(s->name,".bss")==0)
- + {
- + i|=4;
- + adata(abfd).bsssec=s;
- + }
- +
- + if (i!=7) /* One section missing... */
- + {
- + fprintf(stderr,"Missing section, hunk not written\n");
- + return TRUE;
- + }
- +
- + str_size=4; /* the first 4 bytes will be replaced with the length */
- +
- +#define CAN_WRITE_OUTSYM(sym) (sym!=NULL && sym->section && \
- + ((sym->section->owner && \
- + bfd_get_flavour (sym->section->owner) == \
- + bfd_target_aout_flavour) || \
- + bfd_asymbol_flavour(sym) == \
- + bfd_target_aout_flavour))
- +
- + for (i = 0; i < abfd->symcount; i++) /* Translate every symbol */
- + {
- + sym = abfd->outsymbols[i];
- + /* NULL entries have been written already.... */
- + if (CAN_WRITE_OUTSYM (sym))
- + {
- + str_size += strlen(sym->name) + 1;
- + symbols++;
- + }
- + }
- +
- + /* Write out HUNK_DEBUG, size, 0413.... */
- + n[0] = HUNK_DEBUG;
- + n[1] = 3 + ((symbols * sizeof(struct internal_nlist) + str_size + 3) >> 2);
- + n[2] = 0413L; /* Magic number */
- + n[3] = symbols * sizeof(struct internal_nlist);
- + n[4] = str_size;
- + if (!write_longs ((PTR)(n), 5, abfd))
- + return FALSE;
- +
- + /* Write out symbols */
- + for (i = 0; i < abfd->symcount; i++) /* Translate every symbol */
- + {
- + sym = abfd->outsymbols[i];
- + /* NULL entries have been written already.... */
- + if (CAN_WRITE_OUTSYM (sym))
- + {
- + {
- + aout_symbol_type *t = (aout_symbol_type *)
- + &(sym)->the_bfd;
- +
- + bfd_h_put_16(abfd, t->desc, data.e_desc);
- + bfd_h_put_8(abfd, t->other, data.e_other);
- + bfd_h_put_8(abfd, t->type, data.e_type);
- + }
- + if (!translate_to_native_sym_flags(abfd,sym,&data))
- + {
- + fprintf (stderr, "Cannot translate flags for %s\n",
- + sym->name);
- + }
- + PUT_WORD(abfd, offset, &(data.e_strx[0])); /* Store index */
- + offset += strlen(sym->name) + 1;
- + if (bfd_bwrite ((unsigned long *)&data,sizeof(long)*3,abfd)
- + != sizeof(long)*3)
- + return FALSE;
- + }
- + }
- +
- + /* Write out strings */
- + if (!write_longs ((unsigned long *)&str_size, 1, abfd))
- + return FALSE;
- +
- + for (i = 0; i < abfd->symcount; i++) /* Translate every symbol */
- + {
- + sym = abfd->outsymbols[i];
- + /* NULL entries have been written already.... */
- + if (CAN_WRITE_OUTSYM (sym))
- + {
- + int len = strlen(sym->name) + 1;
- +
- + /* Write string tab */
- + if (bfd_bwrite((PTR)(sym->name),sizeof(char)*len,abfd)!=len)
- + return FALSE;
- + }
- + }
- +
- + i = ((str_size + 3) & (~3)) - str_size;
- + str_size = 0;
- + /* Write padding */
- + if (i && bfd_bwrite((PTR)(&str_size),sizeof(char)*i,abfd)!=i)
- + return FALSE;
- +
- + /* write a HUNK_END here to finish the loadfile, or amigaos
- + will refuse to load it */
- + n[0]=HUNK_END;
- + if (!write_longs (n, 1, abfd))
- + return FALSE;
- + }/* Of if abfd->symcount */
- + }/* Of write out debug hunk */
- +
- + bfd_release (abfd, index_map);
- + return TRUE;
- +}
- +
- +/* Write a string padded to 4 bytes and preceded by it's length in
- + long words ORed with <value> */
- +static bfd_boolean
- +write_name (abfd, name, value)
- + bfd *abfd;
- + const char *name;
- + long value;
- +{
- + long i,j;
- + struct name {
- + long len;
- + char buf[MAX_NAME_SIZE+3];
- + } n;
- +
- + j = strlen (name);
- + if (j > MAX_NAME_SIZE)
- + j = MAX_NAME_SIZE;
- + strncpy (n.buf, name, j);
- + i = LONGSIZE (j) | value;
- + n.len = GL (&i);
- + if (j&3) {
- + n.buf[j] = n.buf[j+1] = n.buf[j+2] = '\0';
- + j += (4-(j&3))&3;
- + }
- + return (bfd_bwrite ((PTR)&n, sizeof(long)+j, abfd) == sizeof(long)+j);
- +}
- +
- +static bfd_boolean
- +amiga_write_archive_contents (arch)
- + bfd *arch;
- +{
- + bfd *object;
- + char buffer[DEFAULT_BUFFERSIZE];
- + int i;
- + unsigned long n[2];
- + long size;
- + struct stat status;
- +
- + for (object = arch->archive_head; object; object = object->next)
- + {
- + unsigned int remaining;
- +
- + if (bfd_write_p (object))
- + {
- + bfd_set_error (bfd_error_invalid_operation);
- + return FALSE;
- + }
- +
- + if (stat (object->filename, &status) != 0)
- + {
- + bfd_set_error (bfd_error_system_call);
- + return FALSE;
- + }
- +
- + if (bfd_seek (object, (file_ptr) 0, SEEK_SET) != 0)
- + return FALSE;
- +
- + remaining = status.st_size;
- +
- + while (remaining)
- + {
- + unsigned int amt = DEFAULT_BUFFERSIZE;
- + if (amt > remaining)
- + amt = remaining;
- + errno = 0;
- + if (bfd_bread (buffer, amt, object) != amt)
- + {
- + if (bfd_get_error () != bfd_error_system_call)
- + bfd_set_error (bfd_error_malformed_archive);
- + return FALSE;
- + }
- + if (bfd_bwrite (buffer, amt, arch) != amt)
- + return FALSE;
- + remaining -= amt;
- + }
- + }
- + return TRUE;
- +}
- +
- +static bfd_boolean
- +amiga_write_armap (abfd)
- + bfd *abfd;
- +{
- + return TRUE;
- +}
- +
- +#define determine_size(type) (2 - ((type)>=3 ? (type)-3 : (type)))
- +
- +static int
- +determine_type (r)
- + struct reloc_cache_entry *r;
- +{
- + switch (r->howto->type) /* FIXME: Is this sufficient to distinguish them ?*/
- + {
- + /* AMIGA specific */
- + case HUNK_RELOC8:
- + case HUNK_RELOC16:
- + case HUNK_RELOC32:
- + case HUNK_DREL8:
- + case HUNK_DREL16:
- + case HUNK_DREL32:
- + if (r->howto->type >= HUNK_DREL32)
- + return 3 + r->howto->type - HUNK_DREL32;
- + return r->howto->type - HUNK_RELOC32;
- +
- + /* Now, these may occur, if a.out was used as input */
- + case 0: /* 8 bit ref */
- + return 2;
- +
- + case 1: /* 16 bit relative */
- + return 1;
- +
- + case 2: /* 32 bit relative */
- + return 0;
- +
- + case 9: /* 16 bit base rel */
- + return 4;
- +
- + case 10: /* 32 bit baserel */
- + return 3;
- +
- + /* FIXME: There are other (pc relative) displacements left */
- + default: /* Error, can't represent this */
- + bfd_set_error(bfd_error_nonrepresentable_section);
- + return -1;
- + }/* Of switch */
- +}
- +
- +#define MAX_RELOC_OUT 3
- +
- +static unsigned long reloc_types[]= {
- + HUNK_RELOC32, HUNK_RELOC16, HUNK_RELOC8
- +/* these reloc types are not supported at the moment */
- +#if 0
- + HUNK_DREL32, HUNK_DREL16, HUNK_DREL8
- +#endif
- +};
- +
- +#define NB_RELOC_TYPES (sizeof(reloc_types) / sizeof(reloc_types[0]))
- +
- +/* Write out section contents, including relocs */
- +static bfd_boolean
- +amiga_write_section_contents (abfd, section, data_sec, datadata_relocs,
- + index_map)
- + bfd *abfd;
- + asection *section;
- + asection *data_sec;
- + long datadata_relocs;
- + long *index_map;
- +{
- + static const char zero[3]={0,0,0};
- + unsigned long n[2];
- + int i, j, type, size;
- + unsigned int k;
- + struct reloc_cache_entry *r;
- + asection *osection, *sec, *insection;
- + asymbol *sym_p;
- + int pad, reloc_count = 0;
- + unsigned long disksize;
- + int max_hunk = -1;
- + char *c_p;
- + unsigned char *values;
- + long *reloc_counts;
- +
- + DPRINT(5, ("Entered Write-section-conts\n"));
- +
- + /* Compute the maximum hunk number of the ouput file */
- + sec = abfd->sections;
- + while (sec) {
- + max_hunk++;
- + sec = sec->next;
- + }
- +
- + /* If we are base-relative linking and the section is .bss and abfd
- + is a load file, then return */
- + if (AMIGA_DATA(abfd)->IsLoadFile)
- + {
- + if (amiga_base_relative && (strcmp(section->name, ".bss") == 0))
- + return TRUE; /* Nothing to do */
- + }
- + else
- + {
- + /* WRITE out HUNK_NAME + section name */
- + n[0] = HUNK_NAME;
- + if (!write_longs (n, 1, abfd) || !write_name (abfd, section->name, 0))
- + return FALSE;
- + }
- +
- + /* Depending on the type of the section, write out HUNK_{CODE|DATA|BSS} */
- + if (section->flags & SEC_CODE) /* Code section */
- + n[0] = HUNK_CODE;
- + else if (section->flags & (SEC_DATA | SEC_LOAD)) /* data section */
- + n[0] = HUNK_DATA;
- + else if (section->flags & SEC_ALLOC) /* BSS */
- + n[0] = HUNK_BSS;
- + else if (section->flags & SEC_DEBUGGING) /* debug section */
- + n[0] = HUNK_DEBUG;
- + else /* Error */
- + {
- +#if 0
- + bfd_set_error(bfd_error_nonrepresentable_section);
- + return(FALSE);
- +#else
- + /* FIXME: Just dump everything we don't currently recognize into
- + a DEBUG hunk. */
- + n[0] = HUNK_DEBUG;
- +#endif
- + }
- +
- + DPRINT(10,("Section type is %lx\n",n[0]));
- +
- + /* Get real size in n[1], this may be shorter than the size in the header */
- + disksize = LONGSIZE (amiga_per_section(section)->disk_size) + datadata_relocs;
- + pad = (4-(amiga_per_section(section)->disk_size & 3)) & 3;
- + n[1] = disksize;
- +
- + /* in a load file, we put section attributes only in the header */
- + if (!(AMIGA_DATA(abfd)->IsLoadFile))
- + {
- + /* Get attribute for section */
- + switch (amiga_per_section(section)->attribute)
- + {
- + case MEMF_CHIP:
- + n[1] |= HUNKF_CHIP;
- + break;
- + case MEMF_FAST:
- + n[1] |= HUNKF_FAST;
- + break;
- + case 0:
- + break;
- + default: /* error , can't represent this */
- + bfd_set_error(bfd_error_nonrepresentable_section);
- + return(FALSE);
- + break;
- + }
- + }/* Of switch */
- +
- + if (!write_longs (n, 2, abfd))
- + return FALSE;
- +
- + DPRINT(5,("Wrote code and size=%lx\n",n[1]));
- +
- + /* If a BSS hunk, we're done, else write out section contents */
- + if (HUNK_VALUE(n[0]) == HUNK_BSS)
- + return TRUE;
- +
- + DPRINT(5,("Non bss hunk...\n"));
- +
- + /* Traverse through the relocs, sample them in reloc_data, adjust section
- + data to get 0 addend
- + Then compactify reloc_data
- + Set the entry in the section for the reloc to NULL */
- +
- + if (disksize != 0)
- + BFD_ASSERT((section->flags & SEC_IN_MEMORY) != 0);
- +
- + reloc_counts = (long*) bfd_alloc (abfd, NB_RELOC_TYPES * (max_hunk+1)
- + * sizeof (long));
- + if (!reloc_counts)
- + return FALSE;
- + bzero (reloc_counts, NB_RELOC_TYPES*(max_hunk+1)*sizeof (long));
- +
- + DPRINT(5,("Section has %d relocs\n", section->reloc_count));
- +
- + for (i = 0; i < section->reloc_count; i++)
- + {
- + r = section->orelocation[i];
- + if (r == NULL)
- + continue;
- + sym_p = *(r->sym_ptr_ptr); /* The symbol for this section */
- + insection = sym_p->section;
- + DPRINT(5,("Sec for reloc is %lx(%s)\n",insection,insection->name));
- + DPRINT(5,("Symbol for this reloc is %lx(%s)\n",sym_p, sym_p->name));
- +
- + /* Is reloc relative to a special section ? */
- + if ((insection == bfd_abs_section_ptr) ||
- + (insection == bfd_com_section_ptr) ||
- + (insection == bfd_und_section_ptr) ||
- + (insection == bfd_ind_section_ptr))
- + continue; /* Nothing to do, since this translates to HUNK_EXT */
- +
- + r->addend += sym_p->value; /* Add offset of symbol from section start */
- +
- + /* Address of reloc has been unchanged since original reloc, or has been
- + adjusted by get_relocated_section_contents. */
- + /* For relocs, the vma of the target section is in the data, the
- + addend is -vma of that section =>No need to add vma*/
- + /* Add in offset */
- + r->addend += insection->output_offset;
- + osection = insection->output_section; /* target section */
- +
- + /* Determine which hunk to write, and index of target */
- + j = index_map[osection->index];
- +
- + if (j<0 || j>max_hunk) {
- + fprintf (stderr, "erroneous relocation to hunk %d\n", j);
- + BFD_FAIL ();
- + }
- +
- + type = determine_type(r);
- + if (type == -1)
- + return FALSE;
- + size = determine_size(type);
- +
- + if (type < NB_RELOC_TYPES)
- + reloc_counts[type+(j*NB_RELOC_TYPES)]++;
- + else {
- + bfd_set_error (bfd_error_nonrepresentable_section);
- + return FALSE;
- + }
- +
- + c_p = ((char *)(section->contents)) + r->address;
- + DPRINT(5,("reloc address=%lx,addend=%lx\n",r->address,r->addend));
- +
- + /* There is no error checking with these.. */
- + values = (unsigned char *)c_p;
- + switch (size)
- + {
- + case 0: /* adjust byte */
- + j = (int)(*c_p) + r->addend;
- + *c_p = (signed char)j;
- + break;
- + case 1: /* Adjust word */
- + k = values[1] | (values[0] << 8);
- + j = (int)k + r->addend;
- + values[0] = (j & 0xff00) >> 8;
- + values[1] = j & 0xff;
- + break;
- + case 2: /* adjust long */
- + k = values[3] | (values[2] << 8) | (values[1] << 16) |
- + (values[0] << 24);
- + j = (int)k + r->addend;
- + values[3] = j & 0xff;
- + values[2] = (j & 0xff00) >> 8;
- + values[1] = (j & 0xff0000) >> 16;
- + values[0] = ((unsigned int)j & 0xff000000) >> 24;
- + break;
- + } /* of switch */
- +
- + r->addend = 0;
- + DPRINT(5,("Did adjusting\n"));
- +
- + if (type < MAX_RELOC_OUT)
- + reloc_count++;
- + else
- + section->orelocation[i] = NULL;
- + } /* of for i */
- +
- + DPRINT(5,("Did all relocs\n"));
- +
- + /* We applied all the relocs, as far as possible to obtain 0 addend fields */
- + /* Write the section contents */
- + if (amiga_per_section(section)->disk_size != 0)
- + {
- + if (bfd_bwrite((PTR)(section->contents), sizeof(char) *
- + amiga_per_section(section)->disk_size, abfd) !=
- + amiga_per_section(section)->disk_size)
- + return FALSE;
- + }
- +
- + /* pad the section on disk if necessary (to a long boundary) */
- + if (pad!=0 && (bfd_bwrite (zero, pad, abfd) != pad))
- + return FALSE;
- +
- +#if 0
- + /* write bss data in the data hunk if needed */
- + i = 0;
- + while (bss_size--)
- + if (!write_longs((PTR)&i, 1, abfd))
- + return FALSE;
- +#endif
- +
- + if (datadata_relocs)
- + {
- + datadata_relocs--;
- + if (!write_longs (&datadata_relocs, 1, abfd))
- + return FALSE;
- + for (i = 0; i < data_sec->reloc_count; i++)
- + {
- + r = data_sec->orelocation[i];
- + if (r == NULL)
- + continue;
- + sym_p = *(r->sym_ptr_ptr); /* The symbol for this section */
- + insection = sym_p->section;
- +
- + /* Is reloc relative to a special section ? */
- + if ((insection == bfd_abs_section_ptr) ||
- + (insection == bfd_com_section_ptr) ||
- + (insection == bfd_und_section_ptr) ||
- + (insection == bfd_ind_section_ptr))
- + continue; /* Nothing to do, since this translates to HUNK_EXT */
- +
- + if (insection->output_section == data_sec)
- + {
- + if (determine_type(r) == 0)
- + if (!write_longs ((PTR)&r->address, 1, abfd))
- + return FALSE;
- + }
- + }
- + }
- + DPRINT(10,("Wrote contents, writing relocs now\n"));
- +
- +
- + if (reloc_count) {
- + while (reloc_count) {
- + /* Sample every reloc type */
- + for (i = 0; i < NB_RELOC_TYPES; i++) {
- + int written = FALSE;
- + for (j = 0; j <= max_hunk; j++) {
- + long relocs;
- + while ((relocs = reloc_counts [i+(j*NB_RELOC_TYPES)]) > 0) {
- + if (!written)
- + if (!write_longs(&reloc_types[i], 1, abfd))
- + return FALSE;
- + else
- + written = TRUE;
- +
- + if (relocs > 0xffff)
- + relocs = 0xffff;
- +
- + reloc_counts [i+(j*NB_RELOC_TYPES)] -= relocs;
- + n[0] = relocs;
- + n[1] = j;
- + if (!write_longs(n, 2, abfd))
- + return FALSE;
- + reloc_count -= relocs;
- +
- + for (k = 0; k < section->reloc_count; k++) {
- + int jj;
- +
- + r = section->orelocation[k];
- + if (r == NULL) /* already written */
- + continue;
- + sym_p = *(r->sym_ptr_ptr); /* The symbol for this section */
- + insection = sym_p->section;
- + /* Is reloc relative to a special section ? */
- + if ((insection == bfd_abs_section_ptr) ||
- + (insection == bfd_com_section_ptr) ||
- + (insection == bfd_und_section_ptr) ||
- + (insection == bfd_ind_section_ptr))
- + /* Nothing to do, since this translates to HUNK_EXT */
- + continue;
- +
- + osection = insection->output_section; /* target section */
- +
- +#if 0
- + /* Determine which hunk to write, and index of target */
- + for (jj = 0, sec = abfd->sections; sec != NULL;
- + sec = sec->next, jj++) {
- + if (sec == osection)
- + break;
- + }
- +
- + BFD_ASSERT (jj==index_map[insection->output_section->index]);
- +#else
- + jj=index_map[insection->output_section->index];
- +#endif
- + if (jj == j && i == determine_type(r)) {
- + section->orelocation[k] = NULL;
- + if (!write_longs((PTR)&r->address, 1, abfd))
- + return FALSE;
- + if (--relocs == 0)
- + break;
- + }
- + }
- + }
- + }
- + }
- + }
- + /* write a zero to finish the relocs */
- + if (!write_longs((PTR)&reloc_count, 1, abfd))
- + return FALSE;
- + }
- + bfd_release (abfd, reloc_counts);
- + DPRINT(5,("Leaving write_section...\n"));
- + return TRUE;
- +}
- +
- +
- +/* Write out symbol information, including HUNK_EXT, DEFS, ABS.
- + In the case, we were linking base relative, the symbols of the .bss
- + hunk have been converted already to belong to the .data hunk */
- +
- +static bfd_boolean
- +amiga_write_symbols (abfd, section)
- + bfd *abfd;
- + asection *section;
- +{
- +
- + int i,j;
- + struct reloc_cache_entry *r;
- + asection *osection;
- + asymbol *sym_p;
- + char b[3]="\0\0\0";
- + unsigned long n[3];
- + int symbol_count;
- + unsigned long symbol_header;
- + unsigned long type, tmp;
- + int len;
- +
- + /* If base rel linking and section is .bss ==> exit */
- + if (amiga_base_relative && (strcmp(section->name,".bss")==0))
- + return TRUE;
- +
- + if (section->reloc_count==0 && abfd->symcount==0)
- + {/* Write HUNK_END */
- + alldone:
- + DPRINT(5,("Leaving write_symbols\n"));
- + n[0]=HUNK_END;
- + return write_longs ((PTR)n, 1, abfd);
- + }
- +
- + symbol_count=0;
- + symbol_header=HUNK_EXT;
- +
- + /* If this is Loadfile, then do not write HUNK_EXT, but rather HUNK_SYMB*/
- +
- + /* Write out all the symbol definitions, then HUNK_END
- +
- + Now, first traverse the relocs, all entries that are non NULL
- + have to be taken into account */
- + /* Determine the type of HUNK_EXT to issue and build a single
- + HUNK_EXT subtype */
- +
- +
- + /*FIXME: We write out many HUNK_EXT's entries for references to the
- + same symbol.. */
- + for (i=0;i<section->reloc_count;i++)
- + {
- + r=section->orelocation[i];
- +
- + if (r==NULL) /* Empty entry */
- + continue;
- +
- + sym_p=*(r->sym_ptr_ptr); /* The symbol for this section */
- + osection=sym_p->section; /* The section the symbol belongs to */
- + /* this section MUST be a special section */
- +
- + DPRINT(5,("Symbol is %s, section is %lx(%s)\n",sym_p->name,osection,osection->name));
- +
- + if (osection!=bfd_com_section_ptr) /* Not common symbol */
- + {
- + DPRINT(5,("Non common ref\n"));
- + /* Add a reference to this HUNK */
- + if ((symbol_count++)==0) /* First write out the HUNK_EXT */
- + {
- + tmp=HUNK_EXT;
- + if (!write_longs(&tmp, 1, abfd))
- + return FALSE;
- + }
- +
- + /* Determine type of ref */
- + switch(r->howto->type)
- + {
- + /* AMIGA specific */
- + case 0:
- + case HUNK_RELOC8:
- + type=EXT_REF8;
- + break;
- +
- + case 1:
- + case HUNK_RELOC16:
- + type=EXT_REF16;
- + break;
- +
- + case 2:
- + case HUNK_RELOC32:
- + type=EXT_REF32;
- + break;
- + case HUNK_DREL8:
- + type=EXT_DEXT8;
- + break;
- +
- + case 9:
- + case HUNK_DREL16:
- + type=EXT_DEXT16;
- + break;
- +
- + case 10:
- + case HUNK_DREL32:
- + type=EXT_DEXT32;
- + break;
- +
- + /* FIXME: There are other (pc relative) displacements left */
- + default: /* Error, can't represent this */
- + bfd_set_error(bfd_error_nonrepresentable_section);
- + return FALSE;
- + break;
- + }/* Of switch */
- + DPRINT(5,("Type is %x\n",type));
- +
- + if (!write_name (abfd, sym_p->name, type << 24))
- + return FALSE;
- + n[0]=1; /* 1 ref at address... */
- + n[1]=r->address;
- + if (!write_longs (n, 2, abfd))
- + return FALSE;
- +
- + continue; /* Next relocation */
- + }/* Of is ref to undefined or abs symbol */
- +
- + else /* ref to common symbol */
- + {
- + DPRINT(5,("Common ref\n"));
- +
- + /* If the reference is NOT 32 bit wide absolute , then issue warning */
- + if ((r->howto->type!=2)&&(r->howto->type!=HUNK_RELOC32))
- + fprintf(stderr,"Warning: Non 32 bit wide reference to common symbol %s\n",
- + sym_p->name);
- +
- + if ((symbol_count++)==0) /* First write out the HUNK_EXT */
- + {
- + tmp=HUNK_EXT;
- + if (!write_longs (&tmp, 1, abfd))
- + return FALSE;
- + }
- +
- + if (!write_name (abfd, sym_p->name, EXT_COMMON<<24))
- + return FALSE;
- + n[0]=sym_p->value; /* Size of common block */
- + n[1]=1;
- + n[2]=r->address;
- + if (!write_longs (n, 3, abfd))
- + return FALSE;
- +
- + continue;
- + }/* Of is common section */
- +
- + DPRINT(10,("Failing...\n"));
- + BFD_FAIL();
- + }/* Of traverse relocs */
- +
- +
- + /* Now traverse the symbol table and write out all definitions, that are relative
- + to this hunk */
- + /* Absolute defs are always only written out with the first hunk */
- + /* Don't write out local symbols
- + undefined symbols
- + indirect symbols
- + warning symbols
- + debugging symbols
- + warning symbols
- + constructor symbols, since they are unrepresentable in HUNK format..*/
- +
- + DPRINT(10,("Traversing symbol table\n"));
- + symbol_header=(AMIGA_DATA(abfd)->IsLoadFile)?HUNK_SYMBOL:HUNK_EXT;
- + for (i=0;i<abfd->symcount;i++)
- + {
- + sym_p=abfd->outsymbols[i];
- + osection=sym_p->section;
- +
- + DPRINT(5,("%d. symbol(%s), osec=%x(%s)\n",i,sym_p->name,osection,osection->name));
- +
- + if ((osection==bfd_und_section_ptr)/*||(osection==bfd_com_section_ptr)*/||
- + (osection==bfd_ind_section_ptr))
- + continue; /* Don't write these */
- +
- + /* Only write abs defs, if not writing A Loadfile */
- + if ((osection==bfd_abs_section_ptr)&&(section->index==0)&&
- + !AMIGA_DATA(abfd)->IsLoadFile) /* Write out abs defs */
- + {
- + DPRINT(5,("Abs symbol\n"));
- + /* don't write debug symbols, they will be written in a
- + HUNK_DEBUG later on */
- + if (sym_p->flags & BSF_DEBUGGING)
- + continue;
- +
- + if ((symbol_count++)==0) /* First write out the HUNK_EXT */
- + {
- + if (!write_longs (&symbol_header, 1, abfd))
- + return FALSE;
- + }
- +
- + if (!write_name (abfd, sym_p->name, EXT_ABS << 24))
- + return FALSE;
- + n[0]=sym_p->value;
- + if (!write_longs (n, 1,abfd))
- + return FALSE;
- + continue;
- + }/* Of abs def */
- + if (osection == NULL) /* Happens with constructor functions. FIXME */
- + continue;
- + if (osection==bfd_abs_section_ptr) /* Not first hunk. Already written */
- + continue;
- +
- + /* If it is a warning symbol, or a constructor symbol or a
- + debugging or a local symbol, don't write it */
- + if (sym_p->flags & (BSF_WARNING|BSF_CONSTRUCTOR|BSF_DEBUGGING|BSF_LOCAL))
- + continue;
- +
- + if (!(sym_p->flags & BSF_GLOBAL))
- + continue;
- +
- + /* Now, if osection==section, write it out */
- + if (osection->output_section==section)
- + {
- + DPRINT(5,("Writing it out\n"));
- +
- + if ((symbol_count++)==0) /* First write out the header */
- + {
- + if (!write_longs (&symbol_header, 1, abfd))
- + return FALSE;
- + }
- + type=((symbol_header==HUNK_EXT?EXT_DEF:0)<<24)&0xff000000;
- +
- + if (!write_name (abfd, sym_p->name, type))
- + return FALSE;
- + n[0] = sym_p->value + sym_p->section->output_offset;
- + if (!write_longs (n, 1, abfd))
- + return FALSE;
- + }
- + else
- + {
- + /* write common definitions as bss common references */
- + if (osection->output_section == bfd_com_section_ptr &&
- + section->index == 2)
- + {
- + if ((symbol_count++)==0) /* First write out the header */
- + {
- + if (!write_longs (&symbol_header, 1, abfd))
- + return FALSE;
- + }
- + if (!write_name (abfd, sym_p->name, EXT_COMMON<<24))
- + return FALSE;
- +
- + n[0]=sym_p->value;
- + n[1]=0;
- + if (!write_longs (n, 2, abfd))
- + return FALSE;
- + }
- + }
- + }/* Of for */
- +
- + DPRINT(10,("Did traversing\n"));
- + if (symbol_count) /* terminate HUNK_EXT, HUNK_SYMBOL */
- + {
- + n[0]=0;
- + if (!write_longs (n, 1, abfd))
- + return FALSE;
- + }
- + DPRINT(5,("Leaving\n"));
- + goto alldone; /* Write HUNK_END, return */
- +}
- +
- +static bfd_boolean
- +amiga_get_section_contents (abfd, section, location, offset, count)
- + bfd *abfd;
- + sec_ptr section;
- + PTR location;
- + file_ptr offset;
- + bfd_size_type count;
- +{
- + long disk_size = amiga_per_section (section)->disk_size;
- +
- + if (bfd_seek (abfd, section->filepos + offset, SEEK_SET))
- + return FALSE;
- +
- + if (offset+count > disk_size) {
- + /* the section's size on disk may be smaller than in memory
- + in this case, pad the contents */
- + if (bfd_bread (location, disk_size-offset, abfd) != disk_size-offset)
- + return FALSE;
- + memset ((char *) location + disk_size - offset, 0, count-(disk_size-offset));
- + }
- + else {
- + if (bfd_bread (location, count, abfd) != disk_size-offset)
- + return FALSE;
- + }
- + return TRUE;
- +}
- +
- +
- +bfd_boolean
- +amiga_new_section_hook (abfd, newsect)
- + bfd *abfd;
- + asection *newsect;
- +{
- + newsect->used_by_bfd = (PTR) bfd_zalloc (abfd,
- + sizeof (amiga_per_section_type));
- + newsect->alignment_power = 2;
- + amiga_per_section(newsect)->reloc_tail = NULL;
- + if (!strcmp (newsect->name, ".data_chip") || !strcmp (newsect->name,
- + ".bss_chip"))
- + amiga_per_section(newsect)->attribute |= MEMF_CHIP;
- + return TRUE;
- +}
- +
- +static bfd_boolean
- +amiga_slurp_symbol_table (abfd)
- + bfd *abfd;
- +{
- + amiga_data_type *amiga_data=AMIGA_DATA(abfd);
- + asection *section;
- + struct amiga_raw_symbol *sp;
- + amiga_symbol_type *asp=NULL;
- + unsigned long *lp, l, buf[4];
- + unsigned long len, type;
- +
- + if (amiga_data->symbols)
- + return TRUE; /* already read */
- +
- + if (abfd->symcount)
- + asp = (amiga_symbol_type*) bfd_alloc (abfd, sizeof (amiga_symbol_type) *
- + abfd->symcount);
- + else
- + return TRUE;
- +
- + if (abfd->symcount!=0 && !asp) {
- + bfd_set_error (bfd_error_no_memory);
- + return FALSE;
- + }
- +
- + amiga_data->symbols = asp;
- +
- + /* Symbols are associated with every section */
- + for (section=abfd->sections; section!=NULL; section=section->next)
- + {
- + if (amiga_per_section(section)->hunk_ext_pos == 0)
- + continue;
- +
- + if (bfd_seek (abfd, amiga_per_section(section)->hunk_ext_pos, SEEK_SET))
- + return FALSE;
- +
- + amiga_per_section(section)->amiga_symbols = asp;
- +
- + while (get_long (abfd, &l) && (l!=0))
- + {
- + type = l>>24; /* type of entry */
- + len = (l & 0xffffff) << 2; /* namelength */
- +
- + /* read the name */
- + if ((asp->symbol.name = bfd_alloc (abfd ,len+1))==NULL)
- + {
- + bfd_set_error (bfd_error_no_memory);
- + return FALSE;
- + }
- + if (bfd_bread ((PTR)asp->symbol.name, len, abfd) != len)
- + return FALSE;
- + ((char*)asp->symbol.name)[len] = '\0';
- +
- + asp->symbol.the_bfd = abfd;
- + asp->type = type;
- + asp->symbol.flags = BSF_GLOBAL;
- + asp->index = asp - amiga_data->symbols;
- +
- + switch(type) {
- + case EXT_COMMON: /* Common reference/definition*/
- + asp->symbol.section = bfd_com_section_ptr;
- + asp->hunk_number = -3;
- + /* size of common block -> symbol's value */
- + if (!get_long (abfd, &l))
- + return FALSE;
- + asp->symbol.value = l;
- + /* skip refs */
- + if (!(get_long (abfd, &l) && bfd_seek (abfd, l<<2, SEEK_CUR)==0))
- + return FALSE;
- + break;
- + case EXT_ABS: /* Absolute */
- + asp->symbol.section = bfd_abs_section_ptr;
- + asp->hunk_number = -1;
- + goto rval;
- + break;
- + case EXT_DEF: /* Relative Definition */
- + case EXT_SYMB: /* Same as EXT_DEF for load files */
- + asp->symbol.section = section;
- + asp->hunk_number = section->target_index;
- + rval:
- + /* read the value */
- + if (get_long (abfd, &l))
- + asp->symbol.value = l;
- + else
- + return FALSE;
- + break;
- +
- + default: /* References to an undefined symbol */
- + asp->symbol.section = bfd_und_section_ptr;
- + asp->hunk_number = -2; /* undefined */
- + asp->symbol.flags = 0;
- + /* skip refs */
- + if (!(get_long (abfd, &l) && bfd_seek (abfd, l<<2, SEEK_CUR)==0))
- + return FALSE;
- + break;
- + }
- + asp++;
- + }
- + }
- + return TRUE;
- +}
- +
- +
- +/* Get size of symtab */
- +long
- +amiga_get_symtab_upper_bound (abfd)
- + bfd *abfd;
- +{
- + if (!amiga_slurp_symbol_table (abfd))
- + return -1;
- + return (abfd->symcount+1) * (sizeof (amiga_symbol_type *));
- +}
- +
- +long
- +amiga_get_symtab (abfd, location)
- + bfd *abfd;
- + asymbol **location;
- +{
- + amiga_symbol_type *symp;
- + int i=0;
- +
- + if(!amiga_slurp_symbol_table(abfd))
- + return -1;
- +
- + if (abfd->symcount)
- + {
- + for (symp = AMIGA_DATA(abfd)->symbols; i < bfd_get_symcount (abfd);
- + i++, symp++)
- + *location++ = &symp->symbol;
- + }
- + return abfd->symcount;
- +}
- +
- +asymbol *
- +amiga_make_empty_symbol (abfd)
- + bfd *abfd;
- +{
- + amiga_symbol_type *new =
- + (amiga_symbol_type *) bfd_zalloc (abfd, sizeof (amiga_symbol_type));
- + new->symbol.the_bfd = abfd;
- + return &new->symbol;
- +}
- +
- +
- +
- +void
- +amiga_get_symbol_info (ignore_abfd, symbol, ret)
- + bfd *ignore_abfd;
- + asymbol *symbol;
- + symbol_info *ret;
- +{
- + bfd_symbol_info (symbol, ret);
- + if (symbol->name[0] == ' ')
- + ret->name = "* empty table entry ";
- + if (symbol->section==bfd_abs_section_ptr)
- + ret->type = (symbol->flags & BSF_LOCAL) ? 'a' : 'A';
- +}
- +
- +
- +
- +void
- +amiga_print_symbol (abfd, afile, symbol, how)
- + bfd *abfd;
- + PTR afile;
- + asymbol *symbol;
- + bfd_print_symbol_type how;
- +{
- + FILE *file = (FILE *)afile;
- +
- + switch (how) {
- + case bfd_print_symbol_name:
- + fprintf(file, "%s", symbol->name);
- + break;
- + case bfd_print_symbol_more:
- + fprintf(stderr,"%4x %2x %2x",
- + (unsigned int)((amiga_symbol(symbol)->hunk_number)&0xffff),0,
- + amiga_symbol(symbol)->type);
- + break;
- + case bfd_print_symbol_all:
- + {
- + CONST char *section_name = symbol->section->name;
- + if (symbol->name[0] == ' ')
- + {
- + fprintf(file, "* empty table entry ");
- + }
- + else
- + {
- + bfd_print_symbol_vandf (abfd, (PTR)file, symbol);
- +
- + fprintf(file," %-5s %04x %02x %s",
- + section_name,
- + (unsigned int)((amiga_symbol(symbol)->hunk_number)&0xffff),
- + (unsigned) 0, /* ->other */
- + symbol->name); /* ->name */
- + }
- + }
- + break;
- + }
- +}
- +
- + long
- +amiga_get_reloc_upper_bound (abfd, asect)
- + bfd *abfd;
- + sec_ptr asect;
- +{
- + if (bfd_get_format (abfd) != bfd_object)
- + {
- + bfd_set_error(bfd_error_invalid_operation);
- + return 0;
- + }
- + return sizeof (arelent *) * (asect->reloc_count + 1);
- +}
- +
- +
- +static bfd_boolean
- +read_raw_relocs (abfd, section, d_offset, count)
- + bfd *abfd;
- + sec_ptr section;
- + unsigned long d_offset; /* offset in the bfd */
- + unsigned long count; /* number of relocs */
- +{
- + unsigned long type, no ,offset, hunk_number, j;
- + int index,br;
- +
- + if (bfd_seek (abfd, d_offset, SEEK_SET))
- + return FALSE;
- + while (count > 0)
- + {
- + /* first determine type of reloc */
- + if (!get_long (abfd, &type))
- + return FALSE;
- +
- + switch (type)
- + {
- + case HUNK_RELOC32: /* 32 bit ref */
- + case HUNK_RELOC16: /* 16 bit ref */
- + case HUNK_RELOC8: /* 8 bit ref */
- + case HUNK_DREL32: /* 32 bit ref baserel */
- + case HUNK_DREL16: /* 16 bit baserel */
- + case HUNK_DREL8: /* 8 bit baserel */
- + if (type < HUNK_DREL32)
- + { /*0:8bit, 1: 16bit, 2:32bit */
- + index=2-(type-HUNK_RELOC32);
- + br=0; /* not base relative */
- + }
- + else
- + {
- + index=2-(type-HUNK_DREL32);
- + br=1; /* base relative */
- + }
- +
- + if (!get_long (abfd, &no))
- + return FALSE;
- + while (no) /* read offsets and hunk number */
- + {
- + if (!get_long (abfd, &hunk_number))
- + return FALSE;
- + for (j=0; j<no; j++)
- + { /* add relocs */
- + if (!get_long (abfd, &offset) ||
- + !amiga_add_reloc (abfd, section, offset, NULL,
- + amiga_howto_array[br][index],hunk_number))
- + return FALSE;
- + }
- + count -= no;
- + if (!get_long (abfd, &no))
- + return FALSE;
- + }
- + break;
- +
- + default: /* error */
- + bfd_set_error (bfd_error_wrong_format);
- + return FALSE;
- + break;
- + }
- + }
- +
- +}
- +
- +
- +/* slurp in relocs , amiga_digest_file left various pointers for us*/
- +static bfd_boolean
- +amiga_slurp_relocs (abfd, section, symbols)
- + bfd *abfd;
- + sec_ptr section;
- + asymbol **symbols;
- +{
- + amiga_data_type *amiga_data=AMIGA_DATA(abfd);
- + struct amiga_raw_symbol *sp;
- + amiga_symbol_type *asp;
- + long *lp;
- + unsigned long type, offset, hunk_number, no;
- + int i,n,br,j;
- + int index;
- + long count;
- + amiga_per_section_type *asect = amiga_per_section(section);
- +
- + if (section->relocation)
- + return TRUE;
- +
- + if (asect->raw_relocs8)
- + if (!read_raw_relocs (abfd, section, asect->raw_relocs8,
- + asect->num_raw_relocs8))
- + return FALSE;
- +
- + if (asect->raw_relocs16)
- + if (!read_raw_relocs (abfd, section, asect->raw_relocs16,
- + asect->num_raw_relocs16))
- + return FALSE;
- +
- + if (asect->raw_relocs32)
- + if (!read_raw_relocs (abfd, section, asect->raw_relocs32,
- + asect->num_raw_relocs32))
- + return FALSE;
- +
- + /* Now step through the raw_symbols and add all relocs in them */
- + if (!amiga_data->symbols && !amiga_slurp_symbol_table (abfd))
- + return FALSE;
- +
- + if (amiga_per_section(section)->hunk_ext_pos == 0)
- + return TRUE;
- +
- + if (bfd_seek (abfd, amiga_per_section(section)->hunk_ext_pos, SEEK_SET))
- + return FALSE;
- +
- + asp = amiga_per_section(section)->amiga_symbols;
- + while (get_long (abfd, &n) && n!=0)
- + {
- + type = (n>>24) & 0xff;
- + n &= 0xffffff;
- +
- + /* skip the name */
- + if (bfd_seek (abfd, n<<2, SEEK_CUR))
- + return FALSE;
- +
- + switch (type)
- + {
- + case EXT_SYMB:
- + case EXT_DEF:
- + case EXT_ABS: /* no relocs here */
- + if (bfd_seek (abfd, sizeof (long), SEEK_CUR))
- + return FALSE;
- + break;
- + /* same as below, but advance lp by one to skip common size */
- + case EXT_COMMON:
- + if (bfd_seek (abfd, sizeof (long), SEEK_CUR))
- + return FALSE;
- + /* Fall through */
- + default: /* reference to something */
- + /* points to num of refs to hunk */
- + if (!get_long (abfd, &n))
- + return FALSE;
- +
- + /* Add relocs to this section, relative to asp */
- + /* determine howto first */
- + if (type==EXT_COMMON) /* 32 bit ref */
- + {
- + index=2;
- + br=0;
- + }
- + else
- + {
- + if (type>EXT_REF32)
- + type--; /* skip EXT_COMMON gap */
- +
- + type-=EXT_REF32;
- + br=0;
- +
- + if (type>2) /* base relative */
- + {
- + type-=3;
- + br=1;
- + }
- + index=2-type;
- + }/* of else */
- +
- + for (i=0;i<n;i++) /* refs follow */
- + {
- + if (!get_long (abfd, &offset))
- + return FALSE;
- + if (!amiga_add_reloc (abfd, section, offset, abfd->outsymbols ?
- + (amiga_symbol_type*)abfd->outsymbols[asp->index]: asp,
- + amiga_howto_array[br][index],-4))
- + return FALSE;
- + }
- +
- + break;
- + }/* of switch */
- + asp++;
- + }
- +
- + return TRUE;
- +
- +}/* Of slurp_relocs */
- +
- +
- +long
- +amiga_canonicalize_reloc (abfd, section, relptr, symbols)
- + bfd *abfd;
- + sec_ptr section;
- + arelent **relptr;
- + asymbol **symbols;
- +{
- + amiga_reloc_type *src;
- + int i=0;
- +
- + if (!section->relocation && !amiga_slurp_relocs (abfd, section, symbols))
- + return -1;
- +
- + src = (amiga_reloc_type *)section->relocation;
- + while (src != (amiga_reloc_type *) 0)
- + {
- + *relptr++ = &src->relent;
- + src = src->next;
- + }
- + *relptr = (arelent *) 0;
- +
- + return section->reloc_count;
- +}
- +
- +
- +/* Set section contents */
- +/* We do it the following way:
- + if this is a bss section ==> error
- + otherwise, we try to allocate space for this section,
- + if this has not already been done
- + Then we set the memory area to the contents */
- +static bfd_boolean
- +amiga_set_section_contents (abfd, section, location, offset, count)
- + bfd *abfd;
- + sec_ptr section;
- + unsigned char *location;
- + file_ptr offset;
- + int count;
- +{
- + unsigned char *contents;
- +
- + if ((section->flags&SEC_HAS_CONTENTS)==0) /* BSS */
- + {
- + bfd_set_error(bfd_error_invalid_operation);
- + return FALSE;
- + }
- +
- + if ((section->flags&SEC_IN_MEMORY)==0) /* Not in memory, so alloc space */
- + {
- + contents=bfd_zalloc(abfd,section->_raw_size);
- + if (!contents)
- + {
- + bfd_set_error(bfd_error_no_memory);
- + return FALSE;
- + }
- +
- + DPRINT(5,("Allocated %lx bytes at %lx\n",section->_raw_size,contents));
- +
- + section->contents=contents;
- + section->flags|=SEC_IN_MEMORY;
- + }
- + else /* In memory */
- + contents=section->contents;
- +
- + /* Copy mem */
- + memmove(contents+offset,location,count);
- +
- + return(TRUE);
- +
- +}/* Of section_set_contents */
- +
- +
- +/* FIXME: Is this everything ? */
- +static bfd_boolean
- +amiga_set_arch_mach (abfd, arch, machine)
- + bfd *abfd;
- + enum bfd_architecture arch;
- + unsigned long machine;
- +{
- + bfd_default_set_arch_mach(abfd, arch, machine);
- +
- + if (arch == bfd_arch_m68k)
- + {
- + switch (machine)
- + {
- + case 68000:
- + case 68008:
- + case 68010:
- + case 68020:
- + case 68030:
- + case 68040:
- + case 68070:
- + case 0:
- + return TRUE;
- + default:
- + return FALSE;
- + }
- + }
- + else if (arch == bfd_arch_powerpc)
- + {
- + return TRUE;
- + }
- + return FALSE;
- +}
- +
- +static int
- +DEFUN(amiga_sizeof_headers,(ignore_abfd, ignore),
- + bfd *ignore_abfd AND
- + bfd_boolean ignore)
- +{
- + /* The amiga hunk format doesn't have headers.*/
- + return 0;
- +}
- +
- +/* Provided a BFD, a section and an offset into the section, calculate
- + and return the name of the source file and the line nearest to the
- + wanted location. */
- +bfd_boolean
- +amiga_find_nearest_line(abfd, section, symbols, offset, filename_ptr,
- + functionname_ptr, line_ptr)
- + bfd *abfd;
- + asection *section;
- + asymbol **symbols;
- + bfd_vma offset;
- + char **filename_ptr;
- + char **functionname_ptr;
- + int *line_ptr;
- +{
- + /* FIXME (see aoutx.h, for example) */
- + return FALSE;
- +}
- +
- +static const struct reloc_howto_struct *
- +amiga_bfd_reloc_type_lookup (abfd, code)
- + bfd *abfd;
- + bfd_reloc_code_real_type code;
- +{
- + switch (code)
- + {
- + case BFD_RELOC_8_PCREL: return &howto_hunk_reloc8;
- + case BFD_RELOC_16_PCREL: return &howto_hunk_reloc16;
- + case BFD_RELOC_CTOR:
- + case BFD_RELOC_32_PCREL: return &howto_hunk_reloc32;
- + case BFD_RELOC_8: return &howto_hunk_reloc8;
- + case BFD_RELOC_16: return &howto_hunk_reloc16;
- + case BFD_RELOC_32: return &howto_hunk_reloc32;
- + /* FIXME: Add more cases here for base relative relocs*/
- + default: return 0;
- + }
- +}
- +
- +static bfd_boolean
- +amiga_bfd_copy_private_bfd_data (ibfd, obfd)
- + bfd *ibfd;
- + bfd *obfd;
- +{
- + AMIGA_DATA(obfd)->IsLoadFile = AMIGA_DATA(ibfd)->IsLoadFile;
- + return TRUE;
- +}
- +
- +static bfd_boolean
- +amiga_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
- + bfd *ibfd;
- + asection *isec;
- + bfd *obfd;
- + asection *osec;
- +{
- + if (bfd_get_flavour (osec->owner) == bfd_target_amiga_flavour) {
- + amiga_per_section (osec)->disk_size = amiga_per_section (isec)->disk_size;
- + amiga_per_section (osec)->attribute = amiga_per_section (isec)->attribute;
- + }
- + return TRUE;
- +}
- +
- +/* There is no armap in the amiga libraries, so we fill carsym entries
- + one by one after having parsed the whole archive. */
- +static bfd_boolean
- +amiga_slurp_armap (abfd)
- + bfd *abfd;
- +{
- + unsigned long type, n, slen;
- + struct arch_syms *syms;
- + unsigned long symcount=0;
- + carsym *defsyms, *csym;
- + unsigned long *symblock,len;
- +
- + /* allocate the carsyms */
- + syms = amiga_ardata(abfd)->defsyms;
- + symcount = amiga_ardata(abfd)->defsym_count;
- +
- + defsyms = (carsym*) bfd_alloc (abfd, sizeof (carsym) * symcount);
- + if (!defsyms)
- + return FALSE;
- +
- + bfd_ardata(abfd)->symdefs = defsyms;
- + bfd_ardata(abfd)->symdef_count = symcount;
- +
- + csym = defsyms;
- + while (syms) {
- + if (bfd_seek (abfd, syms->offset, SEEK_SET))
- + return FALSE;
- + symblock = (unsigned long*) bfd_alloc (abfd, syms->size);
- + if (!symblock)
- + return FALSE;
- + if (bfd_bread (symblock, syms->size, abfd) != syms->size)
- + return FALSE;
- + while ((n=GL(symblock)) != 0)
- + {
- + symblock++;
- + len = n & 0xffffff;
- + type = (n>>24) & 0xff;
- + switch (type) {
- + case EXT_SYMB:
- + case EXT_DEF:
- + case EXT_ABS:
- + slen = len<<2;
- + csym->name = (char*)symblock;
- + if (*((char*)symblock+slen-1) != '\0')
- + *((char*)symblock+slen) = '\0';
- + csym->file_offset = syms->unit_offset;
- + csym++;
- + symblock += len+1; /* name+value */
- + break;
- + case EXT_REF8:
- + case EXT_REF16:
- + case EXT_REF32:
- + case EXT_DEXT8:
- + case EXT_DEXT16:
- + case EXT_DEXT32:
- + symblock += len;
- + symblock += 1+GL(symblock);
- + break;
- + case EXT_COMMON:
- + symblock += len+1;
- + symblock += 1+GL(symblock);
- + break;
- + default: /* error */
- + fprintf (stderr, "unexpected type in hunk_ext\n");
- + return FALSE;
- + }
- + }
- + syms = syms->next;
- + }
- + bfd_has_map (abfd) = TRUE;
- + return TRUE;
- +}
- +
- +static void amiga_truncate_arname ()
- +{
- +}
- +
- +static const struct bfd_target *
- +amiga_archive_p (abfd)
- + bfd *abfd;
- +{
- + long header;
- + struct stat stat_buffer;
- + int units;
- + symindex symcount = 0;
- + struct arch_syms *symbols = NULL;
- +
- + bfd_set_error (bfd_error_wrong_format);
- +
- + if (bfd_stat (abfd, &stat_buffer) < 0)
- + return FALSE;
- +
- + if (stat_buffer.st_size != 0)
- + {
- + /* scan the units */
- + if (!parse_archive_units (abfd, &units, stat_buffer.st_size, FALSE,
- + &symbols, &symcount))
- + return NULL;
- +
- + /* if there is only one unit, we consider it's an object, not an
- + archive. Obviously it's not always TRUE but taking objects
- + for archives makes ld fail, so we don't have much of a choice */
- + if (units == 1)
- + return NULL;
- +
- + }
- +
- + if (abfd->arelt_data)
- + arelt_size (abfd) = bfd_tell (abfd);
- +
- + bfd_seek (abfd, 0, SEEK_SET);
- + abfd->arch_info = bfd_scan_arch ("m68k:68000");
- +
- + if (amiga_mkarchive (abfd))
- + {
- + amiga_ardata(abfd)->filesize = stat_buffer.st_size;
- + bfd_ardata(abfd)->first_file_filepos = 0;
- + amiga_ardata(abfd)->defsym_count = symcount;
- + amiga_ardata(abfd)->defsyms = symbols;
- + if (amiga_slurp_armap (abfd))
- + return abfd->xvec;
- + else
- + return NULL;
- + }
- + else
- + return NULL;
- +}
- +
- +static bfd *
- +amiga_openr_next_archived_file (archive, last_file)
- + bfd *archive;
- + bfd *last_file;
- +{
- + file_ptr filestart;
- +
- + if (!last_file)
- + filestart = bfd_ardata(archive)->first_file_filepos;
- + else
- + {
- + unsigned int size = arelt_size (last_file);
- + /* Pad to an even boundary... */
- + filestart = last_file->origin + size;
- + filestart += filestart % 2;
- + }
- +
- + return _bfd_get_elt_at_filepos (archive, filestart);
- +}
- +
- +static PTR
- +amiga_read_ar_hdr (abfd)
- + bfd *abfd;
- +{
- + struct areltdata *ared;
- + char *filename = NULL;
- + unsigned long header, read, len, start_pos;
- +
- + start_pos = bfd_tell (abfd);
- +
- + if (start_pos >= amiga_ardata(abfd)->filesize) {
- + bfd_set_error (bfd_error_no_more_archived_files);
- + return NULL;
- + }
- +
- + if (bfd_bread ((PTR) &header, sizeof (header), abfd) != sizeof (header))
- + return NULL;
- +
- + if (GL(&header) != HUNK_UNIT)
- + {
- + bfd_set_error (bfd_error_malformed_archive);
- + return NULL;
- + }
- +
- + /* get the unit name length in long words */
- + if (!get_long (abfd, &len))
- + return NULL;
- + len = len << 2;
- +
- + ared = bfd_zalloc (abfd, sizeof (struct areltdata));
- + if (ared == NULL) {
- + bfd_set_error (bfd_error_no_memory);
- + return NULL;
- + }
- +
- + if (len)
- + {
- + if (!(ared->filename = bfd_alloc (abfd, len+1)))
- + {
- + bfd_set_error (bfd_error_no_memory);
- + return NULL;
- + }
- + else
- + {
- + if (bfd_bread (ared->filename, len, abfd) != len)
- + return NULL;
- + ared->filename[len] = '\0';
- + }
- + }
- + else
- + ared->filename = "(no name)";
- +
- + if (bfd_seek (abfd, start_pos+4, SEEK_SET))
- + return FALSE;
- +
- + if (!amiga_read_unit (abfd, amiga_ardata(abfd)->filesize))
- + return NULL;
- +
- + ared->parsed_size = bfd_tell(abfd)-start_pos;
- + if (bfd_seek (abfd, start_pos, SEEK_SET))
- + return FALSE;
- + return (PTR) ared;
- +}
- +
- +int
- +amiga_generic_stat_arch_elt (abfd, buf)
- + bfd *abfd;
- + struct stat *buf;
- +{
- + if (abfd->arelt_data == NULL)
- + {
- + bfd_set_error (bfd_error_invalid_operation);
- + return -1;
- + }
- +
- + /* No header in amiga archives. Let's set reasonable default values */
- + buf->st_mtime = 0;
- + buf->st_uid = 0;
- + buf->st_gid = 0;
- + buf->st_mode = 0666;
- +
- + buf->st_size = ((struct areltdata*)(abfd->arelt_data))->parsed_size;
- +
- + return 0;
- +}
- +
- +/* We don't have core files. */
- +#define amiga_core_file_failing_command _bfd_dummy_core_file_failing_command
- +#define amiga_core_file_failing_signal _bfd_dummy_core_file_failing_signal
- +#define amiga_core_file_matches_executable_p _bfd_dummy_core_file_matches_executable_p
- +
- +/* Entry points through BFD_JUMP_TABLE_ARCHIVE */
- +/*#define amiga_slurp_armap bfd_slurp_amiga_armap*/
- +#define amiga_slurp_extended_name_table _bfd_slurp_extended_name_table
- +#define amiga_construct_extended_name_table _bfd_archive_bsd_construct_extended_name_table
- +/*#define amiga_truncate_arname bfd_gnu_truncate_arname*/
- +/*#define amiga_write_armap amiga_write_armap*/
- +/*#define amiga_read_ar_hdr _bfd_generic_read_ar_hdr*/
- +/*#define amiga_openr_next_archived_file bfd_generic_openr_next_archived_file*/
- +
- +#define amiga_get_elt_at_index _bfd_generic_get_elt_at_index
- +/* #define amiga_generic_stat_arch_elt bfd_generic_stat_arch_elt */
- +#define amiga_update_armap_timestamp _bfd_archive_bsd_update_armap_timestamp
- +
- +/* Entry points through BFD_JUMP_TABLE_SYMBOLS */
- +#undef amiga_get_symtab_upper_bound /* defined above */
- +#undef amiga_get_symtab /* defined above */
- +#undef amiga_make_empty_symbol /* defined above */
- +#undef amiga_print_symbol /* defined above */
- +#undef amiga_get_symbol_info /* defined above */
- +#define amiga_bfd_is_local_label bfd_generic_is_local_label
- +#define amiga_get_lineno (struct lineno_cache_entry *(*)())bfd_nullvoidptr
- +#undef amiga_find_nearest_line /* defined above */
- +#define amiga_bfd_make_debug_symbol (asymbol * (*)(bfd *, void *, unsigned long)) bfd_nullvoidptr
- +#define amiga_read_minisymbols _bfd_generic_read_minisymbols
- +#define amiga_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
- +
- +#define amiga_bfd_debug_info_start bfd_void
- +#define amiga_bfd_debug_info_end bfd_void
- +#define amiga_bfd_debug_info_accumulate (PROTO(void,(*),(bfd*, struct sec *))) bfd_void
- +#define amiga_bfd_is_local_label_name bfd_generic_is_local_label_name
- +
- +/* NOTE: We use a special get_relocated_section_contents both in amiga AND in a.out files.
- + In addition, we use an own final_link routine, which is nearly identical to _bfd_generic_final_link */
- +extern bfd_byte *get_relocated_section_contents(bfd*, struct bfd_link_info *,
- + struct bfd_link_order *, bfd_byte *,
- + bfd_boolean, asymbol **);
- +#define amiga_bfd_get_relocated_section_contents get_relocated_section_contents
- +#define amiga_bfd_relax_section bfd_generic_relax_section
- +#define amiga_bfd_gc_sections bfd_generic_gc_sections
- +#define amiga_bfd_merge_sections bfd_generic_merge_sections
- +#define amiga_bfd_discard_group bfd_generic_discard_group
- +
- +#define amiga_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
- +#define amiga_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
- +#define amiga_bfd_link_add_symbols _bfd_generic_link_add_symbols
- +#define amiga_bfd_link_just_syms _bfd_generic_link_just_syms
- +extern bfd_boolean amiga_final_link(bfd *, struct bfd_link_info *);
- +#define amiga_bfd_final_link amiga_final_link
- +
- +/* Entry points through BFD_JUMP_TABLE_GENERIC */
- +#define amiga_close_and_cleanup _bfd_generic_close_and_cleanup
- +#define amiga_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
- +/* amiga_new_section_hook defined above */
- +/* amiga_get_section_hook defined above */
- +#define amiga_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
- +
- +/* Entry points through BFD_JUMP_TABLE_COPY */
- +#define amiga_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data
- +/*#define amiga_bfd_copy_private_section_data _bfd_generic_bfd_copy_private_section_data*/
- +#define amiga_bfd_copy_private_symbol_data _bfd_generic_bfd_copy_private_symbol_data
- +#define amiga_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
- +#define amiga_bfd_print_private_flags _bfd_generic_bfd_print_private_flags
- +#define amiga_bfd_print_private_bfd_data _bfd_generic_bfd_print_private_bfd_data
- +
- +#define amiga_bfd_link_split_section _bfd_generic_link_split_section
- +
- +#if defined (amiga)
- +/* So that the JUMP_TABLE() macro below can work. */
- +#undef amiga
- +#endif
- +
- +const bfd_target amiga_vec =
- +{
- + "amiga", /* name */
- + bfd_target_amiga_flavour,
- + TRUE, /* data byte order is big */
- + TRUE, /* header byte order is big */
- + HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS | WP_TEXT, /* object flags */
- + /* section flags */
- + SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA,
- + '_', /* symbol leading char */
- + ' ', /* ar_pad_char */
- + 15, /* ar_max_namelen */ /* (15 for UNIX compatibility) */
- + bfd_getb64, bfd_getb_signed_64, bfd_putb64, bfd_getb32, bfd_getb_signed_32,
- + bfd_putb32, bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
- + bfd_getb64, bfd_getb_signed_64, bfd_putb64, bfd_getb32, bfd_getb_signed_32,
- + bfd_putb32, bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
- + {
- + /* bfd_check_format */
- + _bfd_dummy_target,
- + amiga_object_p,
- + amiga_archive_p,
- + _bfd_dummy_target
- + },
- + {
- + /* bfd_set_format */
- + bfd_false,
- + amiga_mkobject,
- + amiga_mkarchive,
- + bfd_false
- + },
- + {
- + /* bfd_write_contents */
- + bfd_false,
- + amiga_write_object_contents,
- + amiga_write_archive_contents,
- + bfd_false
- + },
- + BFD_JUMP_TABLE_GENERIC (amiga),
- + BFD_JUMP_TABLE_COPY (amiga),
- + BFD_JUMP_TABLE_CORE (_bfd_nocore),
- + BFD_JUMP_TABLE_ARCHIVE (amiga),
- + BFD_JUMP_TABLE_SYMBOLS (amiga),
- + BFD_JUMP_TABLE_RELOCS (amiga),
- + BFD_JUMP_TABLE_WRITE (amiga),
- + BFD_JUMP_TABLE_LINK (amiga),
- + BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
- + (PTR) 0
- +#if 0
- +/* fixme: no longer in use? */
- + /* How applications can find out about amiga relocation types (see
- + documentation on reloc types). */
- + amiga_reloc_type_lookup
- +#endif
- +};
- diff -urNEBb binutils-2.14-orig/bfd/amigaoslink.c binutils-2.14/bfd/amigaoslink.c
- --- binutils-2.14-orig/bfd/amigaoslink.c 1970-01-01 01:00:00.000000000 +0100
- +++ binutils-2.14/bfd/amigaoslink.c 2003-12-02 14:09:39.000000000 +0100
- @@ -0,0 +1,1190 @@
- +/* BFD back-end for Commodore-Amiga AmigaOS binaries. Linker routines.
- + Copyright (C) 1990-1994 Free Software Foundation, Inc.
- + Contributed by Stephan Thesing
- +
- +This file is part of BFD, the Binary File Descriptor library.
- +
- +This program is free software; you can redistribute it and/or modify
- +it under the terms of the GNU General Public License as published by
- +the Free Software Foundation; either version 2 of the License, or
- +(at your option) any later version.
- +
- +This program is distributed in the hope that it will be useful,
- +but WITHOUT ANY WARRANTY; without even the implied warranty of
- +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +GNU General Public License for more details.
- +
- +You should have received a copy of the GNU General Public License
- +along with this program; if not, write to the Free Software
- +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
- +
- +/*
- +INODE
- +amigalink, , implementation, amiga
- +SECTION
- + amigalink
- +
- +This is the description of the linker routines for the amiga.
- +In fact, this includes a description of the changes made to the
- +a.out code, in order to build a working linker for the Amiga.
- +@menu
- +@* alterations::
- +@end menu
- +
- +INODE
- +alterations, , , amigalink
- +SUBSECTION
- + alterations
- +
- +The file @file{aout-amiga.c} defines the amiga a.out backend. It differs from
- +the sun3 backend only in these details:
- + o The @code{final_link} routine is @code{amiga_final_link}.
- + o The routine to get the relocated section contents is
- + @code{aout_bfd_get_relocated_section_contents}.
- +
- +This ensures that the link is performed properly, but has the side effect of loosing
- +performance.
- +
- +
- +The amiga bfd code uses the same @code{amiga_final_link} routine, but with a
- +different <<get_relocated_section_contents>> entry: <<amiga_bfd_get_relocated_section_contents>>.
- +The latter differs from the routine of the a.out backend only in the application of relocs
- + to the section contents.
- +@@*
- +
- +The usage of a special linker code has one reason:
- +The bfd library assumes that a program is always loaded at a known memory
- +address. This is not a case on an Amiga. So the Amiga format has to take over
- +some relocs to an executable output file.
- +This is not the case with a.out formats, so there relocations can be applied at link time,
- +not at run time, like on the Amiga.
- +The special routines compensate this: instead of applying the relocations, they are
- +copied to the output file, if neccessary.
- +As as consequence, the @code{final_link} and @code{get_relocated_section_contents} are nearly identical to
- +the original routines from @file{linker.c} and @file{reloc.c}.
- +*/
- +
- +#include "bfd.h"
- +#include "bfdlink.h"
- +#include "sysdep.h"
- +#include "genlink.h"
- +#include "libbfd.h"
- +
- +#include "libamiga.h"
- +#undef GET_SWORD
- +#define aadata ((bfd)->tdata.amiga_data->a)
- +#undef adata
- +#include "libaout.h"
- +
- +
- +#define max(x,y) (((x)<=(y))?(y):(x))
- +
- +#define DEBUG_AMIGA 10000
- +
- +#if DEBUG_AMIGA
- +#include <stdarg.h>
- +static void
- +error_print(const char *fmt,...)
- +{
- + va_list args;
- +
- + va_start (args, fmt);
- + vfprintf (stderr, fmt, args);
- + va_end (args);
- +}
- +
- +#define DPRINT(L,x) if (L>=DEBUG_AMIGA) error_print x
- +#else
- +#define DPRINT(L,x)
- +#endif
- +
- +/* This one is used by the linker and tells us, if a debug hunk should be
- + written out*/
- +int write_debug_hunk = 0;
- +
- +/* This is also used by the linker to set the attribute of sections */
- +int amiga_attribute = 0;
- +
- +/* This one is used to indicate base-relative linking */
- +int amiga_base_relative=0;
- +
- +/* This one is used to indicate -resident linking */
- +int amiga_resident=0;
- +
- +/* generate a pOS executable */
- +int amiga_pOS_flg;
- +
- +extern bfd_boolean default_indirect_link_order
- + PARAMS ((bfd *, struct bfd_link_info *, asection *,
- + struct bfd_link_order *, bfd_boolean));
- +
- +
- +
- +bfd_byte *
- +get_relocated_section_contents PARAMS((bfd *, struct bfd_link_info *,
- + struct bfd_link_order *, bfd_byte *,
- + bfd_boolean , asymbol **));
- +static bfd_reloc_status_type
- +amiga_perform_reloc PARAMS((bfd *, arelent *, PTR, asection *, bfd *, char **));
- +static bfd_reloc_status_type
- +aout_perform_reloc PARAMS ((bfd *, arelent *, PTR, asection *, bfd *, char **));
- +static bfd_boolean
- +amiga_reloc_link_order PARAMS ((bfd *, struct bfd_link_info *,asection *,
- + struct bfd_link_order *));
- +
- +
- +/* This one is nearly identical to bfd_generic_get_relocated_section_contents
- + from reloc.c */
- +bfd_byte *
- +get_relocated_section_contents (abfd, link_info, link_order, data,
- + relocateable, symbols)
- + bfd *abfd;
- + struct bfd_link_info *link_info;
- + struct bfd_link_order *link_order;
- + bfd_byte *data;
- + bfd_boolean relocateable;
- + asymbol **symbols;
- +{
- + bfd *input_bfd = link_order->u.indirect.section->owner;
- + asection *input_section = link_order->u.indirect.section;
- +
- + long reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section);
- + arelent **reloc_vector = NULL;
- + long reloc_count;
- + bfd_reloc_status_type (*reloc_func)(bfd *, arelent *, PTR, asection *,
- + bfd *, char **);
- +
- + DPRINT(5,("Entering get_rel_sec_cont\n"));
- +
- + if (reloc_size < 0)
- + goto error_return;
- +
- + if (input_bfd->xvec->flavour==bfd_target_amiga_flavour)
- + reloc_func=amiga_perform_reloc;
- + else if (input_bfd->xvec->flavour==bfd_target_aout_flavour)
- + reloc_func=aout_perform_reloc;
- + else
- + {
- + bfd_set_error(bfd_error_bad_value);
- + goto error_return;
- + }
- +
- + reloc_vector = (arelent **) malloc (reloc_size);
- +
- + if (reloc_vector == NULL && reloc_size != 0)
- + {
- + bfd_set_error (bfd_error_no_memory);
- + goto error_return;
- + }
- +
- + DPRINT(5,("GRSC: GetSecCont()\n"));
- + /* read in the section */
- + if (!bfd_get_section_contents (input_bfd,
- + input_section,
- + (PTR) data,
- + 0,
- + input_section->_raw_size))
- + goto error_return;
- +
- + /* We're not relaxing the section, so just copy the size info */
- + input_section->_cooked_size = input_section->_raw_size;
- + input_section->reloc_done = TRUE;
- +
- + DPRINT(5,("GRSC: CanReloc\n"));
- + reloc_count = bfd_canonicalize_reloc (input_bfd,
- + input_section,
- + reloc_vector,
- + symbols);
- + if (reloc_count < 0)
- + goto error_return;
- +
- + if (reloc_count > 0)
- + {
- + arelent **parent;
- +
- + DPRINT(5,("reloc_count=%d\n",reloc_count));
- +
- + for (parent = reloc_vector; *parent != (arelent *) NULL;
- + parent++)
- + {
- + char *error_message = (char *) NULL;
- + bfd_reloc_status_type r ;
- +
- + DPRINT(5,("Applying a reloc\nparent=%lx, reloc_vector=%lx,"
- + "*parent=%lx\n",parent,reloc_vector,*parent));
- + r=(*reloc_func) (input_bfd,
- + *parent,
- + (PTR) data,
- + input_section,
- + relocateable ? abfd : (bfd *) NULL,
- + &error_message);
- + if (relocateable)
- + {
- + asection *os = input_section->output_section;
- +
- + DPRINT(5,("Keeping reloc\n"));
- + /* A partial link, so keep the relocs */
- + os->orelocation[os->reloc_count] = *parent;
- + os->reloc_count++;
- + }
- +
- + if (r != bfd_reloc_ok)
- + {
- + switch (r)
- + {
- + case bfd_reloc_undefined:
- + if (!((*link_info->callbacks->undefined_symbol)
- + (link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
- + input_bfd, input_section, (*parent)->address, TRUE)))
- + goto error_return;
- + break;
- + case bfd_reloc_dangerous:
- + BFD_ASSERT (error_message != (char *) NULL);
- + if (!((*link_info->callbacks->reloc_dangerous)
- + (link_info, error_message, input_bfd, input_section,
- + (*parent)->address)))
- + goto error_return;
- + break;
- + case bfd_reloc_overflow:
- + if (!((*link_info->callbacks->reloc_overflow)
- + (link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
- + (*parent)->howto->name, (*parent)->addend,
- + input_bfd, input_section, (*parent)->address)))
- + goto error_return;
- + break;
- + case bfd_reloc_outofrange:
- + default:
- + DPRINT(10,("get_rel_sec_cont fails, perform reloc "
- + "returned $%x\n",r));
- + abort ();
- + break;
- + }
- +
- + }
- + }
- + }
- + if (reloc_vector != NULL)
- + free (reloc_vector);
- + DPRINT(5,("GRSC: Returning ok\n"));
- + return data;
- +
- +error_return:
- + DPRINT(5,("GRSC: Error_return\n"));
- + if (reloc_vector != NULL)
- + free (reloc_vector);
- + return NULL;
- +}
- +
- +
- +/* Add a value to a location */
- +static bfd_reloc_status_type
- +my_add_to (data, offset, size, add, sign)
- + PTR data;
- + int offset, size, add, sign;
- +{
- + signed char *p;
- + int val;
- + bfd_reloc_status_type ret;
- +
- + DPRINT(5,("Entering add_value\n"));
- +
- + ret=bfd_reloc_ok;
- + p=((signed char*)data)+offset;
- +
- + switch (size)
- + {
- + case 0: /* byte size */
- + val = (int)(p[0]) + add;
- + /* check for overflow */
- + if (sign) {
- + if (val<-0x80 || val>0x7f)
- + ret = bfd_reloc_overflow;
- + }
- + else {
- + if ((val&0xffffff00)!=0 && (val&0xffffff00)!=0xffffff00)
- + ret=bfd_reloc_overflow;
- + }
- + /* set the value */
- + p[0]=val&0xff;
- + break;
- +
- + case 1: /* word size */
- + val = (int)((p[1]&0xff)|(p[0]<<8)) + add;
- + /* check for overflow */
- + if (sign) {
- + if (val<-0x8000 || val>0x7fff)
- + ret = bfd_reloc_overflow;
- + }
- + else {
- + if ((val&0xffff0000)!=0 && (val&0xffff0000)!=0xffff0000)
- + ret=bfd_reloc_overflow;
- + }
- + /* set the value */
- + p[1]=val&0xff;
- + p[0]=((val&0xff00)>>8)&0xff;
- + break;
- +
- + case 2: /* long word */
- + val = bfd_getb_signed_32 (p) + add;
- + /* If we are linking a resident program, then we limit the reloc size
- + to about +/- 1 GB.
- +
- + When linking a shared library all variables defined in other
- + libraries are placed in memory >0x80000000, so if the library
- + tries to use one of those variables an error is output.
- +
- + Without this it would be much more difficult to check for
- + incorrect references.
- + */
- + if (amiga_resident &&
- + (val & 0xc0000000)!=0 && (val&0xc0000000)!=0xc0000000) /* Overflow */
- + {
- + ret=bfd_reloc_overflow;
- + }
- + bfd_putb32 (val, p);
- + break;
- +
- + default: /* Error */
- + ret=bfd_reloc_notsupported;
- + break;
- + }/* Of switch */
- +
- + DPRINT(5,("Leaving add_value\n"));
- + return (ret);
- +}
- +
- +/* Set a value to a location */
- +static bfd_reloc_status_type
- +my_set_to (data, offset, size, val, sign)
- + PTR data;
- + int offset, size, val, sign;
- +{
- + signed char *p;
- + bfd_reloc_status_type ret;
- +
- + DPRINT(5,("Entering add_value\n"));
- +
- + ret=bfd_reloc_ok;
- + p=((signed char*)data)+offset;
- +
- + switch (size)
- + {
- + case 0: /* byte size */
- + /* check for overflow */
- + if (sign) {
- + if (val<-0x80 || val>0x7f)
- + ret = bfd_reloc_overflow;
- + }
- + else {
- + if ((val&0xffffff00)!=0 && (val&0xffffff00)!=0xffffff00)
- + ret=bfd_reloc_overflow;
- + }
- + /* set the value */
- + p[0]=val&0xff;
- + break;
- +
- + case 1: /* word size */
- + /* check for overflow */
- + if (sign) {
- + if (val<-0x8000 || val>0x7fff)
- + ret = bfd_reloc_overflow;
- + }
- + else {
- + if ((val&0xffff0000)!=0 && (val&0xffff0000)!=0xffff0000)
- + ret=bfd_reloc_overflow;
- + }
- + /* set the value */
- + p[1]=val&0xff;
- + p[0]=((val&0xff00)>>8)&0xff;
- + break;
- +
- + case 2: /* long word */
- + /* If we are linking a resident program, then we limit the reloc size
- + to about +/- 1 GB.
- +
- + When linking a shared library all variables defined in other
- + libraries are placed in memory >0x80000000, so if the library
- + tries to use one of those variables an error is output.
- +
- + Without this it would be much more difficult to check for
- + incorrect references.
- + */
- + if (amiga_resident &&
- + (val & 0xc0000000)!=0 && (val&0xc0000000)!=0xc0000000) /* Overflow */
- + {
- + ret=bfd_reloc_overflow;
- + }
- + p[3] = val & 0xff;
- + p[2] = (val >> 8) & 0xff;
- + p[1] = (val >> 16) & 0xff;
- + p[0] = (val >> 24) & 0xff;
- + break;
- +
- + default: /* Error */
- + ret=bfd_reloc_notsupported;
- + break;
- + }/* Of switch */
- +
- + DPRINT(5,("Leaving set_value\n"));
- + return (ret);
- +}
- +
- +/* Perform an Amiga relocation */
- +static bfd_reloc_status_type
- +amiga_perform_reloc (abfd, r, data, sec, obfd, error_message)
- + bfd *abfd;
- + arelent *r;
- + PTR data;
- + asection *sec;
- + bfd *obfd;
- + char **error_message;
- +{
- + asymbol *sym; /* Reloc is relative to sym */
- + asection *target_section; /* reloc is relative to this section */
- + int relocation;
- + bfd_boolean copy;
- + bfd_reloc_status_type ret;
- + int size = 2;
- + int sign = FALSE;
- +
- + DPRINT(5,("Entering APR\nflavour is %d (aflavour=%d, aout_flavour=%d)\n",
- + sec->owner->xvec->flavour, bfd_target_amiga_flavour,
- + bfd_target_aout_flavour));
- +
- + /* If obfd==NULL: Apply the reloc, if possible. */
- + /* Else: Modify it and return */
- +
- + if (obfd!=NULL) /* Only modify the reloc */
- + {
- + r->address+=sec->output_offset;
- + sec->output_section->flags|=SEC_RELOC;
- + DPRINT(5,("Leaving APR, modified case \n"));
- + return bfd_reloc_ok;
- + }
- +
- + /* Try to apply the reloc */
- +
- + sym=*(r->sym_ptr_ptr);
- +
- +#if 0
- + /* FIXME */
- + if (sym->udata.p)
- + sym = ((struct generic_link_hash_entry*)sym->udata.p)->sym;
- +#endif
- +
- + target_section=sym->section;
- +
- + if (target_section==bfd_und_section_ptr) /* Error */
- + {
- + DPRINT(10,("perform_reloc: Target is undefined section\n"));
- + return bfd_reloc_undefined;
- + }
- +
- + relocation=0; copy=FALSE; ret=bfd_reloc_ok;
- +
- + switch(r->howto->type)
- + {
- + case HUNK_RELOC32: /* 32 bit reloc */
- + DPRINT(5,("RELOC32\n"));
- + size=2;
- + if (target_section==bfd_abs_section_ptr) /* Ref to absolute hunk */
- + relocation=sym->value;
- + else if (target_section==bfd_com_section_ptr) /* ref to common */
- + {
- + relocation=0;
- + copy=TRUE;
- + }
- + else
- + {
- + /* If we access a symbol in the .bss section, we have to convert
- + this to an access to .data section */
- + /* This is done through a change to the symbol... */
- + if (amiga_base_relative && (strcmp(sym->section->output_section->name,
- + ".bss")==0))
- + {
- + /* get value for .data section */
- + bfd *ibfd;
- + asection *s;
- +
- + ibfd=target_section->output_section->owner;
- + for (s=ibfd->sections;s!=NULL;s=s->next)
- + if (strcmp(s->name,".data")==0)
- + {
- + sym->section->output_offset=s->_raw_size;
- + sym->section->output_section=s;
- + }
- + }
- +
- + relocation=0;
- + copy=TRUE;
- + }
- + break;
- +
- + case HUNK_RELOC8:
- + case HUNK_RELOC16:
- + DPRINT(5,("RELOC16/8\n"));
- + size=(r->howto->type==HUNK_RELOC8)?0:1;
- + if (target_section==bfd_abs_section_ptr) /* Ref to absolute hunk */
- + relocation=sym->value;
- + else {
- + if (target_section==bfd_com_section_ptr) /* Error.. */
- + {
- + relocation=0;
- + copy=FALSE;
- + ret=bfd_reloc_undefined;
- + }
- + else
- + {
- + DPRINT(5,("PC relative\n"));
- + /* This is a pc relative hunk... */
- + if (sec->output_section!=target_section->output_section) /* Error */
- + {
- + DPRINT(10,("pc relative, but out of range I\n"));
- + relocation=0;
- + copy =FALSE;
- + ret=bfd_reloc_outofrange;
- + }
- + else
- + { /* Same section */
- + relocation=-(r->address+sec->output_offset);
- + copy=FALSE;
- + }
- + }
- + }
- + break;
- +
- + case HUNK_DREL32: /* baserel relocs */
- + case HUNK_DREL16:
- + case HUNK_DREL8:
- + DPRINT(5,("HUNK_BASEREL relocs\n"));
- +
- + /* Relocs are always relative to the symbol ___a4_init */
- + /* Relocs to .bss section are converted to a reloc to .data section, since
- + .bss section contains only COMMON sections...... and should be
- + following .data section.. */
- +
- + size=(r->howto->type==HUNK_DREL32)?2:((r->howto->type==HUNK_DREL16)?1:0);
- +
- + if (target_section==bfd_abs_section_ptr)
- + {
- + relocation=sym->value;
- + }
- + else
- + {
- + if (! (AMIGA_DATA (target_section->output_section->owner)->baserel))
- + {
- + fprintf(stderr,"Base symbol for base relative reloc not defined,"
- + "section %s, reloc to symbol %s\n", sec->name, sym->name);
- + copy=FALSE;
- + ret=bfd_reloc_notsupported;
- + break;
- + }
- +
- + /* If target->out is .bss, add the value of the .data section to sym->value and
- + set output_section new to .data section.... */
- + if (strcmp(target_section->output_section->name,".bss")==0)
- + {
- + bfd *ibfd;
- + asection *s;
- +
- + ibfd=target_section->output_section->owner;
- + for (s=ibfd->sections;s!=NULL;s=s->next)
- + if (strcmp(s->name,".data")==0)
- + {
- + sym->section->output_section=s;
- + sym->section->output_offset=s->_raw_size;
- + }
- + }
- +
- + relocation = sym->value + sym->section->output_offset
- + - (AMIGA_DATA (target_section->output_section->owner))->a4init
- + + r->addend;
- + copy=FALSE;
- + sign = TRUE;
- + }
- + break;
- +
- + default:
- + fprintf(stderr,"Error:Not supported reloc type:%d\n",r->howto->type);
- + copy=FALSE;
- + relocation=0;
- + ret=bfd_reloc_notsupported;
- + break;
- + } /* Of switch */
- +
- + /* Add in relocation */
- + if (relocation!=0)
- + ret = my_add_to (data, r->address, size, relocation, sign);
- +
- + if (copy)/* Copy reloc to output section */
- + {
- + DPRINT(5,("Copying reloc\n"));
- + target_section=sec->output_section;
- + r->address+=sec->output_offset;
- + target_section->orelocation[target_section->reloc_count++]=r;
- + sec->output_section->flags|=SEC_RELOC;
- + }
- + DPRINT(5,("Leaving a_perform_reloc\n"));
- + return ret;
- +}
- +
- +
- +/* Perform an a.out reloc */
- +static bfd_reloc_status_type
- +aout_perform_reloc (abfd, r, data, sec, obfd, error_message)
- + bfd *abfd;
- + arelent *r;
- + PTR data;
- + asection *sec;
- + bfd *obfd;
- + char **error_message;
- +{
- + asymbol *sym; /* Reloc is relative to this */
- + asection *target_section; /* reloc is relative to this section */
- + int relocation;
- + bfd_boolean copy, addval = TRUE;
- + bfd_reloc_status_type ret;
- + int size = 2;
- + int sign = FALSE;
- +
- + /* If obfd==NULL: Apply the reloc, if possible. */
- + /* Else: Modify it and return */
- + DPRINT(5,("Entering aout_perf_reloc\n"));
- + if (obfd!=NULL) /* Only modify the reloc */
- + {
- + r->address+=sec->output_offset;
- + DPRINT(5,("Leaving aout_perf_reloc, modified\n"));
- + return bfd_reloc_ok;
- + }
- +
- + sym=*(r->sym_ptr_ptr);
- + target_section=sym->section;
- +
- + if (target_section==bfd_und_section_ptr) /* Error */
- + {
- + DPRINT(10,("target_sec=UND, aout_perf_rel\n"));
- + return bfd_reloc_undefined;
- + }
- + relocation=0; copy=FALSE; ret=bfd_reloc_ok;
- +
- + switch (r->howto->type)
- + {
- + case 0: /* 8 bit reloc, pc relative or absolute */
- + case 1: /* 16 bit reloc */
- + DPRINT(10,("16/8 bit relative\n"));
- + size=r->howto->type;
- + if (target_section==bfd_abs_section_ptr) /* Ref to absolute hunk */
- + relocation=sym->value;
- + else if (target_section==bfd_com_section_ptr) /* Error.. */
- + {
- + relocation=0;
- + copy=FALSE;
- + ret=bfd_reloc_undefined;
- + fprintf(stderr,"Pc relative relocation to common symbol \"%s\" "
- + "in section %s\n", sym->name,sec->name);
- + DPRINT(10,("Ref to common symbol...aout_perf_reloc\n"));
- + }
- + else
- + {
- + /* This is a pc relative hunk... or a baserel... */
- + if (sec->output_section!=target_section->output_section)
- + /* Error or baserel */
- + {
- + if (target_section->output_section->flags&SEC_DATA!=0)
- + /* Baserel reloc */
- + {
- + goto baserel; /* Dirty, but no code doubling.. */
- + }/* Of is baserel */
- +
- + relocation=0;
- + copy =FALSE;
- + ret=bfd_reloc_outofrange;
- + fprintf(stderr,"pc relative relocation out of range in section"
- + "%s. Relocation was to symbol %s\n",sec->name,sym->name);
- +
- + DPRINT(10,("Section%s, target %s: Reloc out of range..."
- + "not same section, aout_perf\nsec->out=%s, target->out"
- + "=%s, offset=%lx\n",sec->name, target_section->name,
- + sec->output_section->name,
- + target_section->output_section->name,r->address));
- + }
- + else
- + { /* Same section */
- + relocation=-(r->address+sec->output_offset);
- + copy=FALSE;
- + DPRINT(5,("Reloc to same section...\n"));
- + }
- + }
- + break;
- +
- + case 4: /* 8 bit displacement */
- + case 5: /* 16 bit displacement */
- + case 6: /* 32 bit displacement */
- + size=r->howto->type - 4;
- + sign = TRUE;
- + if (target_section == bfd_abs_section_ptr) /* Ref to absolute hunk */
- + relocation = sym->value;
- + else
- + {
- + relocation = (sym->value + target_section->output_offset) -
- + (r->address + sec->output_offset);
- + if (size == 0)
- + relocation--;
- + addval = FALSE;
- + copy = 0;
- + }
- + break;
- +
- + case 2: /* 32 bit reloc, abs. or relative */
- + DPRINT(10,("32 bit\n"));
- + size=2;
- + if (target_section==bfd_abs_section_ptr) /* Ref to absolute hunk */
- + relocation=sym->value;
- + else if (target_section==bfd_com_section_ptr) /* ref to common */
- + {
- + relocation=0;
- + copy=TRUE;
- + }
- + else
- + {
- + /* If we access a symbol in the .bss section, we have to convert
- + this to an access to .data section*/
- + /* This is done through a change to the output section of
- + the symbol... */
- + if (amiga_base_relative && (strcmp(sym->section->output_section->name,
- + ".bss")==0))
- + {
- + /* get value for .data section */
- + bfd *ibfd;
- + asection *s;
- +
- + ibfd=target_section->output_section->owner;
- + for (s=ibfd->sections;s!=NULL;s=s->next)
- + if (strcmp(s->name,".data")==0)
- + {
- + sym->section->output_section=s;
- + sym->section->output_offset+=s->_raw_size;
- + }
- + }
- + relocation=0;
- + copy=TRUE;
- + }
- + DPRINT(10,("target->out=%s(%lx), sec->out=%s(%lx), symbol=%s\n",
- + target_section->output_section->name,
- + target_section->output_section,sec->output_section->name,
- + sec->output_section,sym->name));
- + break;
- +
- + case 9: /* 16 bit base relative */
- + case 10: /* 32 bit base relative */
- + DPRINT(10,("32/16 bit baserel\n"));
- + /* We use the symbol ___a4_init as base */
- + size=r->howto->type-8;
- +
- + baserel:
- + if (target_section==bfd_abs_section_ptr)
- + {
- + relocation=sym->value;
- + }
- + else if (target_section==bfd_com_section_ptr) /* Error.. */
- + {
- + relocation=0;
- + copy=FALSE;
- + ret=bfd_reloc_undefined;
- + fprintf(stderr,"Baserelative relocation to common \"%s\"\n",
- + sym->name);
- +
- + DPRINT(10,("Ref to common symbol...aout_perf_reloc\n"));
- + }
- + else /* Target section and sec need not be the same... */
- + {
- + if (! (AMIGA_DATA (target_section->output_section->owner)->baserel))
- +
- + {
- + fprintf(stderr,"Base symbol for base relative reloc not defined,"
- + "section %s, reloc to symbol %s\n", sec->name, sym->name);
- + copy=FALSE;
- + ret=bfd_reloc_notsupported;
- + DPRINT(10,("target->out=%s(%lx), sec->out=%s(%lx), symbol=%s\n",
- + target_section->output_section->name,
- + target_section->output_section,
- + sec->output_section->name,
- + sec->output_section,sym->name));
- +
- + break;
- + }
- +
- + /* If target->out is .bss, add the value of the .data section....
- + to sym, set new output_section */
- + if (strcmp(target_section->output_section->name,".bss")==0)
- + {
- + bfd *ibfd;
- + asection *s;
- +
- + ibfd=target_section->output_section->owner;
- +
- + for (s=ibfd->sections;s!=NULL;s=s->next)
- + if (strcmp(s->name,".data")==0)
- + {
- + sym->section->output_offset+=s->_raw_size;
- + sym->section->output_section=s;
- + }
- + }
- +
- + relocation = sym->value+target_section->output_offset - 0x7ffe;
- +
- + /* if the symbol is in bss, subtract the offset that gas has put
- + into the opcode */
- + if (target_section->index == 2)
- + relocation -= abfd->tdata.aout_data->a.datasec->_raw_size;
- +
- + addval = TRUE;
- + copy = FALSE;
- + sign = TRUE;
- +
- + DPRINT (20, ("symbol=%s (0x%lx)\nsection %s (0x%lx; %s; output=0x%lx)"
- + "\nrelocation @0x%lx\n\n", sym->name, sym->value,
- + sym->section->name, (unsigned long)sym->section,
- + sym->section->owner->filename, sym->section->output_offset,
- + r->address));
- + }
- + DPRINT(10,("target->out=%s(%lx), sec->out=%s(%lx), symbol=%s\n",
- + target_section->output_section->name,
- + target_section->output_section,sec->output_section->name,
- + sec->output_section,sym->name));
- + break;
- +
- + default:
- + copy=FALSE;
- + relocation=0;
- + ret=bfd_reloc_notsupported;
- + fprintf(stderr,"Unsupported reloc: %d\n",r->howto->type);
- + break;
- +
- + }/* Of switch */
- +
- + /* Add in relocation */
- + if (relocation!=0)
- + if (addval)
- + ret = my_add_to (data, r->address,size, relocation, sign);
- + else
- + ret = my_set_to (data, r->address, size, relocation, sign);
- +
- + if (copy)/* Copy reloc to output section */
- + {
- + DPRINT(5,("Copying reloc\n"));
- + target_section=sec->output_section;
- + r->address+=sec->output_offset;
- + target_section->orelocation[target_section->reloc_count++]=r;
- + }
- + DPRINT(5,("Leaving aout_perf_reloc with %d (OK=%d)\n",ret,bfd_reloc_ok));
- + return ret;
- +}
- +
- +
- +/* The final link routine, used both by Amiga and a.out backend*/
- +/* This is nearly a copy of _bfd_generic_final_link */
- +bfd_boolean
- +amiga_final_link (abfd, info)
- + bfd *abfd;
- + struct bfd_link_info *info;
- +{
- + bfd *sub;
- + asection *o,*act_sec;
- + struct bfd_link_order *p;
- + size_t outsymalloc;
- + struct generic_write_global_symbol_info wginfo;
- + struct bfd_link_hash_entry *h =
- + bfd_link_hash_lookup (info->hash, "___a4_init", FALSE, FALSE, TRUE);
- +
- + if (h && h->type == bfd_link_hash_defined) {
- + AMIGA_DATA (abfd)->baserel = TRUE;
- + AMIGA_DATA (abfd)->a4init = h->u.def.value;
- + }
- + else
- + AMIGA_DATA (abfd)->baserel = FALSE;
- +
- + DPRINT(5,("Entering final_link\n"));
- +
- + if (abfd->xvec->flavour == bfd_target_aout_flavour)
- + return amiga_aout_bfd_final_link(abfd, info);
- +
- + abfd->outsymbols = (asymbol **) NULL;
- + abfd->symcount = 0;
- + outsymalloc = 0;
- +
- + /* Mark all sections which will be included in the output file. */
- + for (o = abfd->sections; o != NULL; o = o->next)
- + for (p = o->link_order_head; p != NULL; p = p->next)
- + if (p->type == bfd_indirect_link_order)
- + p->u.indirect.section->linker_mark = TRUE;
- +
- + /* Build the output symbol table. */
- + for (sub = info->input_bfds; sub != (bfd *) NULL; sub = sub->link_next)
- + if (! _bfd_generic_link_output_symbols (abfd, sub, info, &outsymalloc))
- + return FALSE;
- +
- + DPRINT(10,("Did build output symbol table\n"));
- +
- + /* Accumulate the global symbols. */
- + wginfo.info = info;
- + wginfo.output_bfd = abfd;
- + wginfo.psymalloc = &outsymalloc;
- + _bfd_generic_link_hash_traverse (_bfd_generic_hash_table (info),
- + _bfd_generic_link_write_global_symbol,
- + (PTR) &wginfo);
- +
- + DPRINT(10,("Accumulated global symbols\n"));
- +
- + DPRINT(10,("Output bfd is %s(%lx)\n",abfd->filename,abfd));
- +
- + /* Allocate space for the output relocs for each section. */
- + /* We also handle base-relative linking special, by setting the .data
- + sections real length to it's length + .bss length */
- + /* This is different to bfd_generic_final_link: We ALWAYS alloc space for
- + the relocs, because we may need it anyway */
- + for (o = abfd->sections;
- + o != (asection *) NULL;
- + o = o->next)
- + {
- + /* If section is .data, find .bss and add that length */
- + if (!info->relocateable && amiga_base_relative &&
- + (strcmp(o->name,".data")==0))
- + {
- + if (abfd->xvec->flavour!=bfd_target_amiga_flavour) /* oops */
- + {
- + fprintf(stderr,"You can't use base relative linking with"
- + " partial links.\n");
- + }
- + else
- + {
- +#if 0
- + for (act_sec=abfd->sections; act_sec!=NULL;act_sec=act_sec->next)
- + if (strcmp(act_sec->name,".bss")==0)
- + amiga_per_section(o)->disk_size = o->_raw_size +
- + act_sec->_raw_size;
- +#endif
- + }
- + }/* Of base-relative linking */
- +
- + DPRINT(10,("Section in output bfd is %s (%lx)\n",o->name,o));
- +
- + o->reloc_count = 0;
- + for (p = o->link_order_head;
- + p != (struct bfd_link_order *) NULL;
- + p = p->next)
- + {
- + if (p->type == bfd_section_reloc_link_order
- + || p->type == bfd_symbol_reloc_link_order)
- + ++o->reloc_count;
- + else if (p->type == bfd_indirect_link_order)
- + {
- + asection *input_section;
- + bfd *input_bfd;
- + long relsize;
- + arelent **relocs;
- + asymbol **symbols;
- + long reloc_count;
- +
- + input_section = p->u.indirect.section;
- + input_bfd = input_section->owner;
- +
- + DPRINT(10,("\tIndirect section from bfd %s, section is %s(%lx)"
- + " (COM=%lx)\n",
- + input_bfd->filename,input_section->name,input_section,
- + bfd_com_section_ptr));
- +
- + relsize = bfd_get_reloc_upper_bound (input_bfd,
- + input_section);
- + if (relsize < 0)
- + {
- + DPRINT(10,("Relsize<0.I..in bfd %s, sec %s\n",
- + input_bfd->filename, input_section->name));
- + return FALSE;
- + }
- +
- + relocs = (arelent **) malloc ((size_t) relsize);
- +
- + if (!relocs && relsize != 0)
- + {
- + bfd_set_error (bfd_error_no_memory);
- + return FALSE;
- + }
- + symbols = _bfd_generic_link_get_symbols (input_bfd);
- + reloc_count = bfd_canonicalize_reloc (input_bfd,
- + input_section,
- + relocs,
- + symbols);
- + if (reloc_count < 0)
- + {
- + DPRINT(10,("Relsize<0.II..in bfd %s, sec %s\n",
- + input_bfd->filename, input_section->name));
- + return FALSE;
- + }
- +
- + BFD_ASSERT (reloc_count == input_section->reloc_count);
- + o->reloc_count += reloc_count;
- + free (relocs);
- + }
- + }
- + if (o->reloc_count > 0)
- + {
- + o->orelocation = ((arelent **)
- + bfd_alloc (abfd,
- + (o->reloc_count
- + * sizeof (arelent *))));
- +
- + if (!o->orelocation)
- + {
- + bfd_set_error (bfd_error_no_memory);
- + return FALSE;
- + }
- + /* o->flags |= SEC_RELOC; There may be no relocs. This can be
- + determined only later */
- + /* Reset the count so that it can be used as an index
- + when putting in the output relocs. */
- + o->reloc_count = 0;
- + }
- + }
- +
- + DPRINT(10,("Got all relocs\n"));
- +
- + /* Handle all the link order information for the sections. */
- + for (o = abfd->sections;
- + o != (asection *) NULL;
- + o = o->next)
- + {
- + for (p = o->link_order_head;
- + p != (struct bfd_link_order *) NULL;
- + p = p->next)
- + {
- + switch (p->type)
- + {
- + case bfd_section_reloc_link_order:
- + case bfd_symbol_reloc_link_order:
- + if (! amiga_reloc_link_order (abfd, info, o, p)) /* We use an own routine */
- + return FALSE;
- + break;
- + case bfd_indirect_link_order:
- + if (! default_indirect_link_order (abfd, info, o, p, FALSE))
- + /* Calls our get_relocated_section_contents*/
- + return FALSE;
- + break;
- + default:
- + if (! _bfd_default_link_order (abfd, info, o, p))
- + return FALSE;
- + break;
- + }
- + }
- + }
- + if (abfd->xvec->flavour==bfd_target_amiga_flavour&&!info->relocateable)
- + AMIGA_DATA(abfd)->IsLoadFile=TRUE;
- +
- + DPRINT(10,("Leaving final_link\n"));
- + return TRUE;
- +}
- +
- +
- +/* Handle reloc link order . This is nearly a copy from generic_reloc_link_order
- + in linker.c*/
- +static bfd_boolean
- +amiga_reloc_link_order(abfd, info, sec, link_order)
- + bfd *abfd;
- + struct bfd_link_info *info;
- + asection *sec;
- + struct bfd_link_order *link_order;
- +{
- + amiga_reloc_type *r;
- +
- + DPRINT(5,("Entering amiga_reloc_link_order\n"));
- +
- + /* We generate a new AMIGA style reloc */
- + BFD_ASSERT(sec->orelocation!=NULL);
- +
- + if (sec->orelocation == (arelent **) NULL)
- + {
- + DPRINT(10,("aborting, since orelocation==NULL\n"));
- + abort ();
- + }
- +
- + r = (amiga_reloc_type *) bfd_zalloc (abfd, sizeof (amiga_reloc_type));
- + if (r == NULL)
- + {
- + bfd_set_error (bfd_error_no_memory);
- + DPRINT(5,("Leaving amiga_reloc_link, no mem\n"));
- + return FALSE;
- + }
- +
- + r->relent.address = link_order->offset;
- + r->relent.howto = bfd_reloc_type_lookup (abfd, link_order->u.reloc.p->reloc);
- + if (r->relent.howto == NULL)
- + {
- + bfd_set_error (bfd_error_bad_value);
- + DPRINT(5,("Leaving amiga_reloc_link, bad value\n"));
- + return FALSE;
- + }
- +
- + /* Get the symbol to use for the relocation. */
- + if (link_order->type == bfd_section_reloc_link_order)
- + r->relent.sym_ptr_ptr = link_order->u.reloc.p->u.section->symbol_ptr_ptr;
- + else
- + {
- + struct generic_link_hash_entry *h;
- +
- + h = _bfd_generic_link_hash_lookup (_bfd_generic_hash_table (info),
- + link_order->u.reloc.p->u.name,
- + FALSE, FALSE, TRUE);
- + if (h == (struct generic_link_hash_entry *) NULL
- + || ! h->written)
- + {
- + if (! ((*info->callbacks->unattached_reloc)
- + (info, link_order->u.reloc.p->u.name,
- + (bfd *) NULL, (asection *) NULL, (bfd_vma) 0)))
- + return FALSE;
- + bfd_set_error (bfd_error_bad_value);
- + DPRINT(5,("Leaving amiga_reloc_link, bad value in hash lookup\n"));
- + return FALSE;
- + }
- + r->relent.sym_ptr_ptr = &h->sym;
- + }
- + DPRINT(5,("Got symbol for relocation\n"));
- + /* Store the addend */
- + r->relent.addend = link_order->u.reloc.p->addend;
- +
- +
- + /* If we are generating relocateable output, just add the reloc */
- + if (info->relocateable)
- + {
- + DPRINT(5,("Adding reloc\n"));
- + sec->orelocation[sec->reloc_count] = (arelent *)r;
- + ++sec->reloc_count;
- + sec->flags|=SEC_RELOC;
- + }
- + else
- + { /* Try to apply the reloc */
- + char *em="";
- + PTR data;
- + bfd_reloc_status_type ret;
- +
- + DPRINT(5,("Apply link_order_reloc\n"));
- + /*FIXME: Maybe, we have to get the section contents, before we use them,
- + if they have not been
- + set by now.. */
- +
- + BFD_ASSERT(sec->contents!=NULL);
- + data=(PTR)(sec->contents);
- +
- + if (bfd_get_flavour(abfd)==bfd_target_amiga_flavour)
- + ret=amiga_perform_reloc(abfd,(arelent *)r,data,sec,NULL,&em);
- + else
- + ret=aout_perform_reloc(abfd,(arelent *)r,data,sec,NULL,&em);
- +
- + if (ret!=bfd_reloc_ok)
- + {
- + DPRINT(5,("Leaving amiga_reloc_link, value FALSE\n"));
- + return FALSE;
- + }
- + }
- + DPRINT(5,("Leaving amiga_reloc_link\n"));
- + return TRUE;
- +}
- diff -urNEBb binutils-2.14-orig/bfd/aout-amiga.c binutils-2.14/bfd/aout-amiga.c
- --- binutils-2.14-orig/bfd/aout-amiga.c 1970-01-01 01:00:00.000000000 +0100
- +++ binutils-2.14/bfd/aout-amiga.c 2003-12-02 14:09:39.000000000 +0100
- @@ -0,0 +1,54 @@
- +/* BFD backend for Amiga style a.out with flags set to 0
- + Copyright (C) 1990, 91, 92, 93, 1994 Free Software Foundation, Inc.
- + Written by Stephan Thesing.
- +
- +This file is part of BFD, the Binary File Descriptor library.
- +
- +This program is free software; you can redistribute it and/or modify
- +it under the terms of the GNU General Public License as published by
- +the Free Software Foundation; either version 2 of the License, or
- +(at your option) any later version.
- +
- +This program is distributed in the hope that it will be useful,
- +but WITHOUT ANY WARRANTY; without even the implied warranty of
- +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +GNU General Public License for more details.
- +
- +You should have received a copy of the GNU General Public License
- +along with this program; if not, write to the Free Software
- +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
- +
- +#define TARGETNAME "a.out-amiga"
- +
- +/* Do not "beautify" the CONCAT* macro args. Traditional C will not
- + remove whitespace added here, and thus will fail to concatenate
- + the tokens. */
- +#define MY(OP) CONCAT2 (aout_amiga_,OP)
- +
- +#include "bfd.h"
- +
- +#define MY_exec_hdr_flags 0
- +
- +extern bfd_boolean
- +amiga_final_link(bfd *,struct bfd_link_info *);
- +#define MY_bfd_final_link amiga_final_link
- +
- +extern bfd_byte *
- +get_relocated_section_contents(bfd *, struct bfd_link_info *,
- + struct bfd_link_order *, bfd_byte *,
- + bfd_boolean , asymbol **);
- +#define MY_bfd_get_relocated_section_contents get_relocated_section_contents
- +
- +/* Include the usual a.out support. */
- +#include "aoutf1.h"
- +
- +/* Final link routine. We need to use a call back to get the correct
- + offsets in the output file. */
- +
- +bfd_boolean
- +amiga_aout_bfd_final_link (abfd, info)
- + bfd *abfd;
- + struct bfd_link_info *info;
- +{
- + return NAME(aout,final_link) (abfd, info, MY_final_link_callback);
- +}
- diff -urNEBb binutils-2.14-orig/bfd/aoutx.h binutils-2.14/bfd/aoutx.h
- --- binutils-2.14-orig/bfd/aoutx.h 2003-03-31 19:13:24.000000000 +0200
- +++ binutils-2.14/bfd/aoutx.h 2003-12-02 14:09:39.000000000 +0100
- @@ -133,7 +133,8 @@
- PARAMS ((bfd *));
- static bfd_boolean translate_from_native_sym_flags
- PARAMS ((bfd *, aout_symbol_type *));
- -static bfd_boolean translate_to_native_sym_flags
- +/*Amiga hack - used in amigaos.c, must be global */
- +/*static*/ bfd_boolean translate_to_native_sym_flags
- PARAMS ((bfd *, asymbol *, struct external_nlist *));
- static void adjust_o_magic
- PARAMS ((bfd *, struct internal_exec *));
- @@ -1657,7 +1658,7 @@
-
- /* Set the fields of SYM_POINTER according to CACHE_PTR. */
-
- -static bfd_boolean
- +/*static*/ bfd_boolean
- translate_to_native_sym_flags (abfd, cache_ptr, sym_pointer)
- bfd *abfd;
- asymbol *cache_ptr;
- @@ -2065,12 +2066,31 @@
-
- PUT_WORD (abfd, g->address, natptr->r_address);
-
- - r_length = g->howto->size ; /* Size as a power of two. */
- + r_length = g->howto->size ; /* Size as a power of two */
- r_pcrel = (int) g->howto->pc_relative; /* Relative to PC? */
- +#if 1
- + /* FIXME! "#if 1" is the wrong way to select this Amiga specific code.
- + We can't just test for __amigaos__ defined either, since we may be
- + building a cross compiler and __amigaos__ is only defined if the
- + compiler we are using is targeted for the Amiga. */
- + /* Changed for cooperation with AMIGA backend */
- + /* This only applies, if aout flavour 191194 ST*/
- /* XXX This relies on relocs coming from a.out files. */
- + if (bfd_asymbol_bfd(sym)->xvec->flavour==bfd_target_aout_flavour)
- + {
- r_baserel = (g->howto->type & 8) != 0;
- r_jmptable = (g->howto->type & 16) != 0;
- r_relative = (g->howto->type & 32) != 0;
- + }
- + else
- + {
- + r_baserel=r_jmptable=r_relative=0;
- + }
- +#else
- + r_baserel = (g->howto->type & 8) != 0;
- + r_jmptable = (g->howto->type & 16) != 0;
- + r_relative = (g->howto->type & 32) != 0;
- +#endif
-
- #if 0
- /* For a standard reloc, the addend is in the object file. */
- @@ -2369,8 +2389,12 @@
- /* Base relative relocs are always against the symbol table,
- regardless of the setting of r_extern. r_extern just reflects
- whether the symbol the reloc is against is local or global. */
- +#if 0
- + /* FIXME! "#if 0" is the wrong way to disable this code. See comment
- + earlier in file. */
- if (r_baserel)
- r_extern = 1;
- +#endif
-
- if (r_extern && r_index > symcount)
- {
- diff -urNEBb binutils-2.14-orig/bfd/bfd-in2.h binutils-2.14/bfd/bfd-in2.h
- --- binutils-2.14-orig/bfd/bfd-in2.h 2003-05-03 17:06:56.000000000 +0200
- +++ binutils-2.14/bfd/bfd-in2.h 2003-12-02 14:09:39.000000000 +0100
- @@ -2484,6 +2484,10 @@
- BFD_RELOC_PPC_EMB_RELST_HA,
- BFD_RELOC_PPC_EMB_BIT_FLD,
- BFD_RELOC_PPC_EMB_RELSDA,
- + BFD_RELOC_PPC_MORPHOS_DREL,
- + BFD_RELOC_PPC_MORPHOS_DREL_LO,
- + BFD_RELOC_PPC_MORPHOS_DREL_HI,
- + BFD_RELOC_PPC_MORPHOS_DREL_HA,
- BFD_RELOC_PPC64_HIGHER,
- BFD_RELOC_PPC64_HIGHER_S,
- BFD_RELOC_PPC64_HIGHEST,
- @@ -3806,6 +3810,7 @@
- struct cisco_core_struct *cisco_core_data;
- struct versados_data_struct *versados_data;
- struct netbsd_core_struct *netbsd_core_data;
- + struct amiga_data_struct *amiga_data;
- struct mach_o_data_struct *mach_o_data;
- struct mach_o_fat_data_struct *mach_o_fat_data;
- struct bfd_pef_data_struct *pef_data;
- @@ -4069,6 +4074,7 @@
- enum bfd_flavour
- {
- bfd_target_unknown_flavour,
- + bfd_target_amiga_flavour,
- bfd_target_aout_flavour,
- bfd_target_coff_flavour,
- bfd_target_ecoff_flavour,
- diff -urNEBb binutils-2.14-orig/bfd/bfd.c binutils-2.14/bfd/bfd.c
- --- binutils-2.14-orig/bfd/bfd.c 2003-03-01 00:43:34.000000000 +0100
- +++ binutils-2.14/bfd/bfd.c 2003-12-02 14:09:39.000000000 +0100
- @@ -183,6 +183,7 @@
- . struct cisco_core_struct *cisco_core_data;
- . struct versados_data_struct *versados_data;
- . struct netbsd_core_struct *netbsd_core_data;
- +. struct amiga_data_struct *amiga_data;
- . struct mach_o_data_struct *mach_o_data;
- . struct mach_o_fat_data_struct *mach_o_fat_data;
- . struct bfd_pef_data_struct *pef_data;
- diff -urNEBb binutils-2.14-orig/bfd/bfdio.c binutils-2.14/bfd/bfdio.c
- --- binutils-2.14-orig/bfd/bfdio.c 2002-11-18 17:37:52.000000000 +0100
- +++ binutils-2.14/bfd/bfdio.c 2003-12-02 17:43:31.000000000 +0100
- @@ -325,7 +325,32 @@
- if (direction == SEEK_SET && abfd->my_archive != NULL)
- file_position += abfd->origin;
-
- +#ifndef __amigaos__
- result = fseek (f, file_position, direction);
- +#else
- + {
- + struct stat stat_buf;
- + if (direction == SEEK_CUR)
- + file_position += ftell (f);
- + fflush (f);
- + if (!(result = fstat (fileno (f), &stat_buf)) &&
- + file_position > stat_buf.st_size &&
- + !(result = fseek (f, stat_buf.st_size, SEEK_SET))) {
- + int zeroes = file_position - stat_buf.st_size;
- + char *buf = calloc (4096, 1);
- + if (buf) {
- + while (zeroes > 0) {
- + int r, x = (zeroes > 4096? 4096 : zeroes);
- + if ((r = write (fileno (f), buf, x))<=0)
- + break;
- + zeroes -= r;
- + }
- + free (buf);
- + }
- + }
- + result = fseek (f, file_position, SEEK_SET);
- + }
- +#endif
- if (result != 0)
- {
- int hold_errno = errno;
- diff -urNEBb binutils-2.14-orig/bfd/config.bfd binutils-2.14/bfd/config.bfd
- --- binutils-2.14-orig/bfd/config.bfd 2003-06-02 21:35:20.000000000 +0200
- +++ binutils-2.14/bfd/config.bfd 2003-12-02 14:09:39.000000000 +0100
- @@ -38,7 +38,7 @@
- c54x*) targ_archs=bfd_tic54x_arch ;;
- dlx*) targ_archs=bfd_dlx_arch ;;
- hppa*) targ_archs=bfd_hppa_arch ;;
- -i[3456]86) targ_archs=bfd_i386_arch ;;
- +i[3456]86*) targ_archs=bfd_i386_arch ;;
- i370) targ_archs=bfd_i370_arch ;;
- m6811*|m68hc11*) targ_archs="bfd_m68hc11_arch bfd_m68hc12_arch" ;;
- m6812*|m68hc12*) targ_archs="bfd_m68hc12_arch bfd_m68hc11_arch" ;;
- @@ -543,6 +543,11 @@
- targ_selfvecs=i386chaos_vec
- ;;
-
- + i[3456]86be-*-amithlon*)
- + targ_defvec=bfd_elf32_i386be_amithlon_vec
- + targ_selvecs="bfd_elf32_i386_vec bfd_elf32_i386be_amithlon_vec"
- + ;;
- +
- i860-*-mach3* | i860-*-osf1* | i860-*-coff*)
- targ_defvec=i860coff_vec
- ;;
- @@ -605,6 +610,10 @@
- m68*-motorola-sysv*)
- targ_defvec=m68ksysvcoff_vec
- ;;
- + m68*-*-amigaos*)
- + targ_defvec=amiga_vec
- + targ_selvecs="aout_amiga_vec amiga_vec"
- + ;;
- m68*-hp-bsd*)
- targ_defvec=hp300bsd_vec
- targ_underscore=yes
- @@ -684,7 +693,7 @@
- targ_selvecs="m68kcoff_vec versados_vec tekhex_vec"
- targ_underscore=yes
- ;;
- - m68*-cbm-*)
- + m68*-cbm-amix)
- targ_defvec=bfd_elf32_m68k_vec
- targ_selvecs=m68kcoff_vec
- ;;
- @@ -892,6 +901,18 @@
- targ_cflags=-DSMALL_ARCHIVE;;
- esac
- ;;
- + powerpc-*-amigaoshunk*)
- + targ_defvec=amiga_vec
- + targ_selvecs="bfd_elf32_powerpc_vec bfd_elf32_powerpcle_vec aout_amiga_vec"
- + ;;
- + powerpc-*-amigaos*)
- + targ_defvec=bfd_elf32_powerpc_vec
- + targ_selvecs="bfd_elf32_powerpcle_vec"
- + ;;
- + powerpc-*-morphos*)
- + targ_defvec=bfd_elf32_morphos_vec
- + targ_selvecs="bfd_elf32_morphos_vec"
- + ;;
- #ifdef BFD64
- powerpc64-*-aix*)
- targ_defvec=rs6000coff64_vec
- @@ -907,6 +928,10 @@
- targ_selvecs="bfd_elf64_powerpc_vec bfd_elf32_powerpcle_vec bfd_elf32_powerpc_vec rs6000coff_vec rs6000coff64_vec"
- ;;
- #endif
- + powerpc-*-amiga*)
- + targ_defvec=bfd_elf32_amiga_vec
- + targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec bfd_elf32_powerpcle_vec ppcboot_vec"
- + ;;
- powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
- powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
- powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*)
- diff -urNEBb binutils-2.14-orig/bfd/configure binutils-2.14/bfd/configure
- --- binutils-2.14-orig/bfd/configure 2003-06-12 15:25:46.000000000 +0200
- +++ binutils-2.14/bfd/configure 2003-12-15 12:05:30.000000000 +0100
- @@ -1,57 +1,324 @@
- #! /bin/sh
- -
- # Guess values for system-dependent variables and create Makefiles.
- -# Generated automatically using autoconf version 2.13
- -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
- +# Generated by GNU Autoconf 2.57.
- #
- +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
- +# Free Software Foundation, Inc.
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- +## --------------------- ##
- +## M4sh Initialization. ##
- +## --------------------- ##
- +
- +# Be Bourne compatible
- +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- + emulate sh
- + NULLCMD=:
- + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- + # is contrary to our usage. Disable this feature.
- + alias -g '${1+"$@"}'='"$@"'
- +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- + set -o posix
- +fi
- +
- +# Support unset when possible.
- +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
- + as_unset=unset
- +else
- + as_unset=false
- +fi
- +
- +
- +# Work around bugs in pre-3.0 UWIN ksh.
- +$as_unset ENV MAIL MAILPATH
- +PS1='$ '
- +PS2='> '
- +PS4='+ '
- +
- +# NLS nuisances.
- +for as_var in \
- + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- + LC_TELEPHONE LC_TIME
- +do
- + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
- + eval $as_var=C; export $as_var
- + else
- + $as_unset $as_var
- + fi
- +done
- +
- +# Required to use basename.
- +if expr a : '\(a\)' >/dev/null 2>&1; then
- + as_expr=expr
- +else
- + as_expr=false
- +fi
- +
- +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- + as_basename=basename
- +else
- + as_basename=false
- +fi
- +
- +
- +# Name of the executable.
- +as_me=`$as_basename "$0" ||
- +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- + X"$0" : 'X\(//\)$' \| \
- + X"$0" : 'X\(/\)$' \| \
- + . : '\(.\)' 2>/dev/null ||
- +echo X/"$0" |
- + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- + /^X\/\(\/\/\)$/{ s//\1/; q; }
- + /^X\/\(\/\).*/{ s//\1/; q; }
- + s/.*/./; q'`
- +
- +
- +# PATH needs CR, and LINENO needs CR and PATH.
- +# Avoid depending upon Character Ranges.
- +as_cr_letters='abcdefghijklmnopqrstuvwxyz'
- +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
- +as_cr_Letters=$as_cr_letters$as_cr_LETTERS
- +as_cr_digits='0123456789'
- +as_cr_alnum=$as_cr_Letters$as_cr_digits
- +
- +# The user is always right.
- +if test "${PATH_SEPARATOR+set}" != set; then
- + echo "#! /bin/sh" >conf$$.sh
- + echo "exit 0" >>conf$$.sh
- + chmod +x conf$$.sh
- + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- + PATH_SEPARATOR=';'
- + else
- + PATH_SEPARATOR=:
- + fi
- + rm -f conf$$.sh
- +fi
- +
- +
- + as_lineno_1=$LINENO
- + as_lineno_2=$LINENO
- + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- + test "x$as_lineno_1" != "x$as_lineno_2" &&
- + test "x$as_lineno_3" = "x$as_lineno_2" || {
- + # Find who we are. Look in the path if we contain no path at all
- + # relative or not.
- + case $0 in
- + *[\\/]* ) as_myself=$0 ;;
- + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
- +done
- +
- + ;;
- + esac
- + # We did not find ourselves, most probably we were run as `sh COMMAND'
- + # in which case we are not to be found in the path.
- + if test "x$as_myself" = x; then
- + as_myself=$0
- + fi
- + if test ! -f "$as_myself"; then
- + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- + { (exit 1); exit 1; }; }
- + fi
- + case $CONFIG_SHELL in
- + '')
- + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for as_base in sh bash ksh sh5; do
- + case $as_dir in
- + /*)
- + if ("$as_dir/$as_base" -c '
- + as_lineno_1=$LINENO
- + as_lineno_2=$LINENO
- + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- + test "x$as_lineno_1" != "x$as_lineno_2" &&
- + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- + CONFIG_SHELL=$as_dir/$as_base
- + export CONFIG_SHELL
- + exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- + fi;;
- + esac
- + done
- +done
- +;;
- + esac
- +
- + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- + # uniformly replaced by the line number. The first 'sed' inserts a
- + # line-number line before each line; the second 'sed' does the real
- + # work. The second script uses 'N' to pair each line-number line
- + # with the numbered line, and appends trailing '-' during
- + # substitution so that $LINENO is not a special case at line end.
- + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- + sed '=' <$as_myself |
- + sed '
- + N
- + s,$,-,
- + : loop
- + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- + t loop
- + s,-$,,
- + s,^['$as_cr_digits']*\n,,
- + ' >$as_me.lineno &&
- + chmod +x $as_me.lineno ||
- + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- + { (exit 1); exit 1; }; }
- +
- + # Don't try to exec as it changes $[0], causing all sort of problems
- + # (the dirname of $[0] is not the place where we might find the
- + # original and so on. Autoconf is especially sensible to this).
- + . ./$as_me.lineno
- + # Exit status is that of the last command.
- + exit
- +}
- +
- +
- +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- + *c*,-n*) ECHO_N= ECHO_C='
- +' ECHO_T=' ' ;;
- + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- + *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
- +esac
- +
- +if expr a : '\(a\)' >/dev/null 2>&1; then
- + as_expr=expr
- +else
- + as_expr=false
- +fi
- +
- +rm -f conf$$ conf$$.exe conf$$.file
- +echo >conf$$.file
- +if ln -s conf$$.file conf$$ 2>/dev/null; then
- + # We could just check for DJGPP; but this test a) works b) is more generic
- + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- + if test -f conf$$.exe; then
- + # Don't use ln at all; we don't have any links
- + as_ln_s='cp -p'
- + else
- + as_ln_s='ln -s'
- + fi
- +elif ln conf$$.file conf$$ 2>/dev/null; then
- + as_ln_s=ln
- +else
- + as_ln_s='cp -p'
- +fi
- +rm -f conf$$ conf$$.exe conf$$.file
- +
- +if mkdir -p . 2>/dev/null; then
- + as_mkdir_p=:
- +else
- + as_mkdir_p=false
- +fi
- +
- +as_executable_p="test -f"
- +
- +# Sed expression to map a string onto a valid CPP name.
- +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
- +
- +# Sed expression to map a string onto a valid variable name.
- +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
- +
-
- -# Defaults:
- -ac_help=
- +# IFS
- +# We need space, tab and new line, in precisely that order.
- +as_nl='
- +'
- +IFS=" $as_nl"
- +
- +# CDPATH.
- +$as_unset CDPATH
- +
- +
- +# Name of the host.
- +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
- +# so uname gets run too.
- +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
- +
- +exec 6>&1
- +
- +#
- +# Initializations.
- +#
- ac_default_prefix=/usr/local
- -# Any additions from configure.in:
- -ac_help="$ac_help
- - --enable-shared[=PKGS] build shared libraries [default=no]"
- -ac_help="$ac_help
- - --enable-static[=PKGS] build static libraries [default=yes]"
- -ac_help="$ac_help
- - --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
- -ac_help="$ac_help
- - --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
- -ac_help="$ac_help
- - --disable-libtool-lock avoid locking (might break parallel builds)"
- -ac_help="$ac_help
- - --with-pic try to use only PIC/non-PIC objects [default=use both]"
- -ac_help="$ac_help
- - --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)"
- -ac_help="$ac_help
- - --enable-targets alternative target configurations"
- -ac_help="$ac_help
- - --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
- -ac_help="$ac_help
- - --with-mmap try using mmap for BFD input files if available"
- -ac_help="$ac_help
- - --enable-build-warnings Enable build-time compiler warnings if gcc is used"
- -ac_help="$ac_help
- - --enable-maintainer-mode enable make rules and dependencies not useful
- - (and sometimes confusing) to the casual installer"
- -ac_help="$ac_help
- - --enable-install-libbfd controls installation of libbfd and related headers"
- -ac_help="$ac_help
- - --disable-nls do not use Native Language Support"
- -ac_help="$ac_help
- - --with-included-gettext use the GNU gettext library included here"
- +ac_config_libobj_dir=.
- +cross_compiling=no
- +subdirs=
- +MFLAGS=
- +MAKEFLAGS=
- +SHELL=${CONFIG_SHELL-/bin/sh}
- +
- +# Maximum number of lines to put in a shell here document.
- +# This variable seems obsolete. It should probably be removed, and
- +# only ac_max_sed_lines should be used.
- +: ${ac_max_here_lines=38}
- +
- +# Identity of this package.
- +PACKAGE_NAME=
- +PACKAGE_TARNAME=
- +PACKAGE_VERSION=
- +PACKAGE_STRING=
- +PACKAGE_BUGREPORT=
- +
- +ac_unique_file="libbfd.c"
- +# Factoring default headers for most tests.
- +ac_includes_default="\
- +#include <stdio.h>
- +#if HAVE_SYS_TYPES_H
- +# include <sys/types.h>
- +#endif
- +#if HAVE_SYS_STAT_H
- +# include <sys/stat.h>
- +#endif
- +#if STDC_HEADERS
- +# include <stdlib.h>
- +# include <stddef.h>
- +#else
- +# if HAVE_STDLIB_H
- +# include <stdlib.h>
- +# endif
- +#endif
- +#if HAVE_STRING_H
- +# if !STDC_HEADERS && HAVE_MEMORY_H
- +# include <memory.h>
- +# endif
- +# include <string.h>
- +#endif
- +#if HAVE_STRINGS_H
- +# include <strings.h>
- +#endif
- +#if HAVE_INTTYPES_H
- +# include <inttypes.h>
- +#else
- +# if HAVE_STDINT_H
- +# include <stdint.h>
- +# endif
- +#endif
- +#if HAVE_UNISTD_H
- +# include <unistd.h>
- +#endif"
- +
- +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE bfd_version bfd_version_string AR ac_ct_AR RANLIB ac_ct_RANLIB LN_S LIBTOOL WARN_CFLAGS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT INSTALL_LIBBFD_TRUE INSTALL_LIBBFD_FALSE bfdlibdir bfdincludedir CPP EGREP ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l HDEFINES BFD_HOST_64BIT_LONG BFD_HOST_64_BIT_DEFINED BFD_HOST_64_BIT BFD_HOST_U_64_BIT CC_FOR_BUILD EXEEXT_FOR_BUILD COREFILE COREFLAG WIN32LDFLAGS WIN32LIBADD TDEFINES wordsize bfd_libs all_backends bfd_backends bfd_machines bfd_default_target_size tdefaults LIBOBJS LTLIBOBJS'
- +ac_subst_files=''
-
- # Initialize some variables set by options.
- +ac_init_help=
- +ac_init_version=false
- # The variables have the same names as the options, with
- # dashes changed to underlines.
- -build=NONE
- -cache_file=./config.cache
- +cache_file=/dev/null
- exec_prefix=NONE
- -host=NONE
- no_create=
- -nonopt=NONE
- no_recursion=
- prefix=NONE
- program_prefix=NONE
- @@ -59,12 +326,16 @@
- program_transform_name=s,x,x,
- silent=
- site=
- -sitefile=
- srcdir=
- -target=NONE
- verbose=
- x_includes=NONE
- x_libraries=NONE
- +
- +# Installation directory options.
- +# These are left unexpanded so users can "make install exec_prefix=/foo"
- +# and all the variables that are supposed to be based on exec_prefix
- +# by default will actually change.
- +# Use braces instead of parens because sh, perl, etc. also accept them.
- bindir='${exec_prefix}/bin'
- sbindir='${exec_prefix}/sbin'
- libexecdir='${exec_prefix}/libexec'
- @@ -78,13 +349,6 @@
- infodir='${prefix}/info'
- mandir='${prefix}/man'
-
- -# Initialize some other variables.
- -subdirs=
- -MFLAGS= MAKEFLAGS=
- -SHELL=${CONFIG_SHELL-/bin/sh}
- -# Maximum number of lines to put in a shell here document.
- -ac_max_here_lines=12
- -
- ac_prev=
- for ac_option
- do
- @@ -96,59 +360,59 @@
- continue
- fi
-
- - case "$ac_option" in
- - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- - *) ac_optarg= ;;
- - esac
- + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- - case "$ac_option" in
- + case $ac_option in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- - bindir="$ac_optarg" ;;
- + bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- - ac_prev=build ;;
- + ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- - build="$ac_optarg" ;;
- + build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- - cache_file="$ac_optarg" ;;
- + cache_file=$ac_optarg ;;
- +
- + --config-cache | -C)
- + cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- - datadir="$ac_optarg" ;;
- + datadir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- - fi
- - ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- - eval "enable_${ac_feature}=no" ;;
- + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- + { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- + { (exit 1); exit 1; }; }
- + ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- + eval "enable_$ac_feature=no" ;;
-
- -enable-* | --enable-*)
- - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- - fi
- - ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- - case "$ac_option" in
- - *=*) ;;
- + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- + { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- + { (exit 1); exit 1; }; }
- + ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- + case $ac_option in
- + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- - eval "enable_${ac_feature}='$ac_optarg'" ;;
- + eval "enable_$ac_feature='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- @@ -157,96 +421,47 @@
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- - exec_prefix="$ac_optarg" ;;
- + exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- - -help | --help | --hel | --he)
- - # Omit some internal or obsolete options to make the list less imposing.
- - # This message is too long to be a string in the A/UX 3.1 sh.
- - cat << EOF
- -Usage: configure [options] [host]
- -Options: [defaults in brackets after descriptions]
- -Configuration:
- - --cache-file=FILE cache test results in FILE
- - --help print this message
- - --no-create do not create output files
- - --quiet, --silent do not print \`checking...' messages
- - --site-file=FILE use FILE as the site file
- - --version print the version of autoconf that created configure
- -Directory and file names:
- - --prefix=PREFIX install architecture-independent files in PREFIX
- - [$ac_default_prefix]
- - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- - [same as prefix]
- - --bindir=DIR user executables in DIR [EPREFIX/bin]
- - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- - --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- - --datadir=DIR read-only architecture-independent data in DIR
- - [PREFIX/share]
- - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- - --sharedstatedir=DIR modifiable architecture-independent data in DIR
- - [PREFIX/com]
- - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- - --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- - --includedir=DIR C header files in DIR [PREFIX/include]
- - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- - --infodir=DIR info documentation in DIR [PREFIX/info]
- - --mandir=DIR man documentation in DIR [PREFIX/man]
- - --srcdir=DIR find the sources in DIR [configure dir or ..]
- - --program-prefix=PREFIX prepend PREFIX to installed program names
- - --program-suffix=SUFFIX append SUFFIX to installed program names
- - --program-transform-name=PROGRAM
- - run sed PROGRAM on installed program names
- -EOF
- - cat << EOF
- -Host type:
- - --build=BUILD configure for building on BUILD [BUILD=HOST]
- - --host=HOST configure for HOST [guessed]
- - --target=TARGET configure for TARGET [TARGET=HOST]
- -Features and packages:
- - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- - --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- - --x-includes=DIR X include files are in DIR
- - --x-libraries=DIR X library files are in DIR
- -EOF
- - if test -n "$ac_help"; then
- - echo "--enable and --with options recognized:$ac_help"
- - fi
- - exit 0 ;;
- + -help | --help | --hel | --he | -h)
- + ac_init_help=long ;;
- + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- + ac_init_help=recursive ;;
- + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- + ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- - ac_prev=host ;;
- + ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- - host="$ac_optarg" ;;
- + host_alias=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- - includedir="$ac_optarg" ;;
- + includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- - infodir="$ac_optarg" ;;
- + infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- - libdir="$ac_optarg" ;;
- + libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- - libexecdir="$ac_optarg" ;;
- + libexecdir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- @@ -255,19 +470,19 @@
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- - localstatedir="$ac_optarg" ;;
- + localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- - mandir="$ac_optarg" ;;
- + mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- - | --no-cr | --no-c)
- + | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- @@ -281,26 +496,26 @@
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- - oldincludedir="$ac_optarg" ;;
- + oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- - prefix="$ac_optarg" ;;
- + prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- - program_prefix="$ac_optarg" ;;
- + program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- - program_suffix="$ac_optarg" ;;
- + program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- @@ -317,7 +532,7 @@
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- - program_transform_name="$ac_optarg" ;;
- + program_transform_name=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- @@ -327,7 +542,7 @@
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- - sbindir="$ac_optarg" ;;
- + sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- @@ -338,63 +553,57 @@
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- - sharedstatedir="$ac_optarg" ;;
- + sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- - site="$ac_optarg" ;;
- -
- - -site-file | --site-file | --site-fil | --site-fi | --site-f)
- - ac_prev=sitefile ;;
- - -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- - sitefile="$ac_optarg" ;;
- + site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- - srcdir="$ac_optarg" ;;
- + srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- - sysconfdir="$ac_optarg" ;;
- + sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- - ac_prev=target ;;
- + ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- - target="$ac_optarg" ;;
- + target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- - -version | --version | --versio | --versi | --vers)
- - echo "configure generated by autoconf version 2.13"
- - exit 0 ;;
- + -version | --version | --versio | --versi | --vers | -V)
- + ac_init_version=: ;;
-
- -with-* | --with-*)
- - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- - fi
- + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- + { echo "$as_me: error: invalid package name: $ac_package" >&2
- + { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- - case "$ac_option" in
- - *=*) ;;
- + case $ac_option in
- + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- - eval "with_${ac_package}='$ac_optarg'" ;;
- + eval "with_$ac_package='$ac_optarg'" ;;
-
- -without-* | --without-*)
- - ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- - fi
- - ac_package=`echo $ac_package| sed 's/-/_/g'`
- - eval "with_${ac_package}=no" ;;
- + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- + { echo "$as_me: error: invalid package name: $ac_package" >&2
- + { (exit 1); exit 1; }; }
- + ac_package=`echo $ac_package | sed 's/-/_/g'`
- + eval "with_$ac_package=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- @@ -405,99 +614,110 @@
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- - x_includes="$ac_optarg" ;;
- + x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- - x_libraries="$ac_optarg" ;;
- + x_libraries=$ac_optarg ;;
-
- - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- + -*) { echo "$as_me: error: unrecognized option: $ac_option
- +Try \`$0 --help' for more information." >&2
- + { (exit 1); exit 1; }; }
- ;;
-
- + *=*)
- + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- + # Reject names that are not valid shell variable names.
- + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- + { (exit 1); exit 1; }; }
- + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- + eval "$ac_envvar='$ac_optarg'"
- + export $ac_envvar ;;
- +
- *)
- - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- - echo "configure: warning: $ac_option: invalid host type" 1>&2
- - fi
- - if test "x$nonopt" != xNONE; then
- - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- - fi
- - nonopt="$ac_option"
- + # FIXME: should be removed in autoconf 3.0.
- + echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- + echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
- done
-
- if test -n "$ac_prev"; then
- - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
- -fi
- -
- -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
- -
- -# File descriptor usage:
- -# 0 standard input
- -# 1 file creation
- -# 2 errors and warnings
- -# 3 some systems may open it to /dev/tty
- -# 4 used on the Kubota Titan
- -# 6 checking for... messages and results
- -# 5 compiler messages saved in config.log
- -if test "$silent" = yes; then
- - exec 6>/dev/null
- -else
- - exec 6>&1
- + ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- + { echo "$as_me: error: missing argument to $ac_option" >&2
- + { (exit 1); exit 1; }; }
- fi
- -exec 5>./config.log
-
- -echo "\
- -This file contains any messages produced by compilers while
- -running configure, to aid debugging if configure makes a mistake.
- -" 1>&5
- +# Be sure to have absolute paths.
- +for ac_var in exec_prefix prefix
- +do
- + eval ac_val=$`echo $ac_var`
- + case $ac_val in
- + [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- + { (exit 1); exit 1; }; };;
- + esac
- +done
-
- -# Strip out --no-create and --no-recursion so they do not pile up.
- -# Also quote any args containing shell metacharacters.
- -ac_configure_args=
- -for ac_arg
- +# Be sure to have absolute paths.
- +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- + localstatedir libdir includedir oldincludedir infodir mandir
- do
- - case "$ac_arg" in
- - -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- - | --no-cr | --no-c) ;;
- - -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- - ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- - *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- + eval ac_val=$`echo $ac_var`
- + case $ac_val in
- + [\\/$]* | ?:[\\/]* ) ;;
- + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- + { (exit 1); exit 1; }; };;
- esac
- done
-
- -# NLS nuisances.
- -# Only set these to C if already set. These must not be set unconditionally
- -# because not all systems understand e.g. LANG=C (notably SCO).
- -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
- -# Non-C LC_CTYPE values break the ctype check.
- -if test "${LANG+set}" = set; then LANG=C; export LANG; fi
- -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
- -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
- -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
- +# There might be people who depend on the old broken behavior: `$host'
- +# used to hold the argument of --host etc.
- +# FIXME: To remove some day.
- +build=$build_alias
- +host=$host_alias
- +target=$target_alias
- +
- +# FIXME: To remove some day.
- +if test "x$host_alias" != x; then
- + if test "x$build_alias" = x; then
- + cross_compiling=maybe
- + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- + If a cross compiler is detected then cross compile mode will be used." >&2
- + elif test "x$build_alias" != "x$host_alias"; then
- + cross_compiling=yes
- + fi
- +fi
-
- -# confdefs.h avoids OS command line length limits that DEFS can exceed.
- -rm -rf conftest* confdefs.h
- -# AIX cpp loses on an empty file, so make sure it contains at least a newline.
- -echo > confdefs.h
- +ac_tool_prefix=
- +test -n "$host_alias" && ac_tool_prefix=$host_alias-
- +
- +test "$silent" = yes && exec 6>/dev/null
-
- -# A filename unique to this package, relative to the directory that
- -# configure is in, which we can look for to find out if srcdir is correct.
- -ac_unique_file=libbfd.c
-
- # Find the source files, if location was not specified.
- if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- - ac_prog=$0
- - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- + ac_confdir=`(dirname "$0") 2>/dev/null ||
- +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- + X"$0" : 'X\(//\)[^/]' \| \
- + X"$0" : 'X\(//\)$' \| \
- + X"$0" : 'X\(/\)' \| \
- + . : '\(.\)' 2>/dev/null ||
- +echo X"$0" |
- + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- + /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- + /^X\(\/\/\)$/{ s//\1/; q; }
- + /^X\(\/\).*/{ s//\1/; q; }
- + s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- @@ -507,920 +727,2343 @@
- fi
- if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
- + { (exit 1); exit 1; }; }
- else
- - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- + { (exit 1); exit 1; }; }
- fi
- fi
- -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
- +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
- + { (exit 1); exit 1; }; }
- +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
- +ac_env_build_alias_set=${build_alias+set}
- +ac_env_build_alias_value=$build_alias
- +ac_cv_env_build_alias_set=${build_alias+set}
- +ac_cv_env_build_alias_value=$build_alias
- +ac_env_host_alias_set=${host_alias+set}
- +ac_env_host_alias_value=$host_alias
- +ac_cv_env_host_alias_set=${host_alias+set}
- +ac_cv_env_host_alias_value=$host_alias
- +ac_env_target_alias_set=${target_alias+set}
- +ac_env_target_alias_value=$target_alias
- +ac_cv_env_target_alias_set=${target_alias+set}
- +ac_cv_env_target_alias_value=$target_alias
- +ac_env_CC_set=${CC+set}
- +ac_env_CC_value=$CC
- +ac_cv_env_CC_set=${CC+set}
- +ac_cv_env_CC_value=$CC
- +ac_env_CFLAGS_set=${CFLAGS+set}
- +ac_env_CFLAGS_value=$CFLAGS
- +ac_cv_env_CFLAGS_set=${CFLAGS+set}
- +ac_cv_env_CFLAGS_value=$CFLAGS
- +ac_env_LDFLAGS_set=${LDFLAGS+set}
- +ac_env_LDFLAGS_value=$LDFLAGS
- +ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
- +ac_cv_env_LDFLAGS_value=$LDFLAGS
- +ac_env_CPPFLAGS_set=${CPPFLAGS+set}
- +ac_env_CPPFLAGS_value=$CPPFLAGS
- +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
- +ac_cv_env_CPPFLAGS_value=$CPPFLAGS
- +ac_env_CPP_set=${CPP+set}
- +ac_env_CPP_value=$CPP
- +ac_cv_env_CPP_set=${CPP+set}
- +ac_cv_env_CPP_value=$CPP
-
- -# Prefer explicitly selected file to automatically selected ones.
- -if test -z "$sitefile"; then
- - if test -z "$CONFIG_SITE"; then
- - if test "x$prefix" != xNONE; then
- - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- - else
- - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- - fi
- - fi
- -else
- - CONFIG_SITE="$sitefile"
- -fi
- -for ac_site_file in $CONFIG_SITE; do
- - if test -r "$ac_site_file"; then
- - echo "loading site script $ac_site_file"
- - . "$ac_site_file"
- - fi
- -done
- +#
- +# Report the --help message.
- +#
- +if test "$ac_init_help" = "long"; then
- + # Omit some internal or obsolete options to make the list less imposing.
- + # This message is too long to be a string in the A/UX 3.1 sh.
- + cat <<_ACEOF
- +\`configure' configures this package to adapt to many kinds of systems.
-
- -if test -r "$cache_file"; then
- - echo "loading cache $cache_file"
- - . $cache_file
- -else
- - echo "creating cache $cache_file"
- - > $cache_file
- -fi
- +Usage: $0 [OPTION]... [VAR=VALUE]...
-
- -ac_ext=c
- -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- -ac_cpp='$CPP $CPPFLAGS'
- -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
- -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- -cross_compiling=$ac_cv_prog_cc_cross
- +To assign environment variables (e.g., CC, CFLAGS...), specify them as
- +VAR=VALUE. See below for descriptions of some of the useful variables.
-
- -ac_exeext=
- -ac_objext=o
- -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- - ac_n= ac_c='
- -' ac_t=' '
- - else
- - ac_n=-n ac_c= ac_t=
- - fi
- -else
- - ac_n= ac_c='\c' ac_t=
- -fi
- +Defaults for the options are specified in brackets.
-
- -echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
- -echo "configure:567: checking for Cygwin environment" >&5
- -if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 572 "configure"
- -#include "confdefs.h"
- +Configuration:
- + -h, --help display this help and exit
- + --help=short display options specific to this package
- + --help=recursive display the short help of all the included packages
- + -V, --version display version information and exit
- + -q, --quiet, --silent do not print \`checking...' messages
- + --cache-file=FILE cache test results in FILE [disabled]
- + -C, --config-cache alias for \`--cache-file=config.cache'
- + -n, --no-create do not create output files
- + --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
- -int main() {
- +_ACEOF
-
- -#ifndef __CYGWIN__
- -#define __CYGWIN__ __CYGWIN32__
- -#endif
- -return __CYGWIN__;
- -; return 0; }
- -EOF
- -if { (eval echo configure:583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- - ac_cv_cygwin=yes
- -else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - ac_cv_cygwin=no
- -fi
- -rm -f conftest*
- -rm -f conftest*
- -fi
- + cat <<_ACEOF
- +Installation directories:
- + --prefix=PREFIX install architecture-independent files in PREFIX
- + [$ac_default_prefix]
- + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- + [PREFIX]
-
- -echo "$ac_t""$ac_cv_cygwin" 1>&6
- -CYGWIN=
- -test "$ac_cv_cygwin" = yes && CYGWIN=yes
- -echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
- -echo "configure:600: checking for mingw32 environment" >&5
- -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 605 "configure"
- -#include "confdefs.h"
- -
- -int main() {
- -return __MINGW32__;
- -; return 0; }
- -EOF
- -if { (eval echo configure:612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- - ac_cv_mingw32=yes
- -else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - ac_cv_mingw32=no
- -fi
- -rm -f conftest*
- -rm -f conftest*
- -fi
- +By default, \`make install' will install all the files in
- +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
- +an installation prefix other than \`$ac_default_prefix' using \`--prefix',
- +for instance \`--prefix=\$HOME'.
- +
- +For better control, use the options below.
- +
- +Fine tuning of the installation directories:
- + --bindir=DIR user executables [EPREFIX/bin]
- + --sbindir=DIR system admin executables [EPREFIX/sbin]
- + --libexecdir=DIR program executables [EPREFIX/libexec]
- + --datadir=DIR read-only architecture-independent data [PREFIX/share]
- + --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- + --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- + --libdir=DIR object code libraries [EPREFIX/lib]
- + --includedir=DIR C header files [PREFIX/include]
- + --oldincludedir=DIR C header files for non-gcc [/usr/include]
- + --infodir=DIR info documentation [PREFIX/info]
- + --mandir=DIR man documentation [PREFIX/man]
- +_ACEOF
-
- -echo "$ac_t""$ac_cv_mingw32" 1>&6
- -MINGW32=
- -test "$ac_cv_mingw32" = yes && MINGW32=yes
- + cat <<\_ACEOF
-
- +Program names:
- + --program-prefix=PREFIX prepend PREFIX to installed program names
- + --program-suffix=SUFFIX append SUFFIX to installed program names
- + --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-
- -ac_aux_dir=
- -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- - if test -f $ac_dir/install-sh; then
- - ac_aux_dir=$ac_dir
- - ac_install_sh="$ac_aux_dir/install-sh -c"
- - break
- - elif test -f $ac_dir/install.sh; then
- - ac_aux_dir=$ac_dir
- - ac_install_sh="$ac_aux_dir/install.sh -c"
- - break
- - fi
- -done
- -if test -z "$ac_aux_dir"; then
- - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
- +System types:
- + --build=BUILD configure for building on BUILD [guessed]
- + --host=HOST cross-compile to build programs to run on HOST [BUILD]
- + --target=TARGET configure for building compilers for TARGET [HOST]
- +_ACEOF
- fi
- -ac_config_guess=$ac_aux_dir/config.guess
- -ac_config_sub=$ac_aux_dir/config.sub
- -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
- +if test -n "$ac_init_help"; then
-
- -# Do some error checking and defaulting for the host and target type.
- -# The inputs are:
- -# configure --host=HOST --target=TARGET --build=BUILD NONOPT
- -#
- -# The rules are:
- -# 1. You are not allowed to specify --host, --target, and nonopt at the
- -# same time.
- -# 2. Host defaults to nonopt.
- -# 3. If nonopt is not specified, then host defaults to the current host,
- -# as determined by config.guess.
- -# 4. Target and build default to nonopt.
- -# 5. If nonopt is not specified, then target and build default to host.
- + cat <<\_ACEOF
-
- -# The aliases save the names the user supplied, while $host etc.
- -# will get canonicalized.
- -case $host---$target---$nonopt in
- -NONE---*---* | *---NONE---* | *---*---NONE) ;;
- -*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
- -esac
- +Optional Features:
- + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- + --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- + --disable-dependency-tracking Speeds up one-time builds
- + --enable-dependency-tracking Do not reject slow dependency extractors
- + --enable-shared=PKGS build shared libraries default=no
- + --enable-static=PKGS build static libraries default=yes
- + --enable-fast-install=PKGS optimize for fast installation default=yes
- + --disable-libtool-lock avoid locking (might break parallel builds)
- + --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
- + --enable-targets alternative target configurations
- + --enable-commonbfdlib build shared BFD/opcodes/libiberty library
- + --enable-build-warnings Enable build-time compiler warnings if gcc is used
- + --enable-maintainer-mode enable make rules and dependencies not useful
- + (and sometimes confusing) to the casual installer
- + --enable-install-libbfd controls installation of libbfd and related headers
- + --disable-nls do not use Native Language Support
-
- +Optional Packages:
- + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- + --with-gnu-ld assume the C compiler uses GNU ld default=no
- + --with-pic try to use only PIC/non-PIC objects default=use both
- + --with-mmap try using mmap for BFD input files if available
- + --with-included-gettext use the GNU gettext library included here
- +
- +Some influential environment variables:
- + CC C compiler command
- + CFLAGS C compiler flags
- + LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
- + nonstandard directory <lib dir>
- + CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
- + headers in a nonstandard directory <include dir>
- + CPP C preprocessor
- +
- +Use these variables to override the choices made by `configure' or to help
- +it to find libraries and programs with nonstandard names/locations.
- +
- +_ACEOF
- +fi
- +
- +if test "$ac_init_help" = "recursive"; then
- + # If there are subdirs, report their specific --help.
- + ac_popdir=`pwd`
- + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- + test -d $ac_dir || continue
- + ac_builddir=.
-
- -# Make sure we can run config.sub.
- -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
- -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
- +if test "$ac_dir" != .; then
- + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- + # A "../" for each directory in $ac_dir_suffix.
- + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
- +else
- + ac_dir_suffix= ac_top_builddir=
- fi
-
- -echo $ac_n "checking host system type""... $ac_c" 1>&6
- -echo "configure:677: checking host system type" >&5
- -
- -host_alias=$host
- -case "$host_alias" in
- -NONE)
- - case $nonopt in
- - NONE)
- - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- +case $srcdir in
- + .) # No --srcdir option. We are building in place.
- + ac_srcdir=.
- + if test -z "$ac_top_builddir"; then
- + ac_top_srcdir=.
- + else
- + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- - *) host_alias=$nonopt ;;
- - esac ;;
- + [\\/]* | ?:[\\/]* ) # Absolute path.
- + ac_srcdir=$srcdir$ac_dir_suffix;
- + ac_top_srcdir=$srcdir ;;
- + *) # Relative path.
- + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- + ac_top_srcdir=$ac_top_builddir$srcdir ;;
- esac
- +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
- +# absolute.
- +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
- +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
- +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
- +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
- +
- + cd $ac_dir
- + # Check for guested configure; otherwise get Cygnus style configure.
- + if test -f $ac_srcdir/configure.gnu; then
- + echo
- + $SHELL $ac_srcdir/configure.gnu --help=recursive
- + elif test -f $ac_srcdir/configure; then
- + echo
- + $SHELL $ac_srcdir/configure --help=recursive
- + elif test -f $ac_srcdir/configure.ac ||
- + test -f $ac_srcdir/configure.in; then
- + echo
- + $ac_configure --help
- + else
- + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- + fi
- + cd $ac_popdir
- + done
- +fi
-
- -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
- -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
- -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
- -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
- -echo "$ac_t""$host" 1>&6
- -
- -echo $ac_n "checking target system type""... $ac_c" 1>&6
- -echo "configure:698: checking target system type" >&5
- -
- -target_alias=$target
- -case "$target_alias" in
- -NONE)
- - case $nonopt in
- - NONE) target_alias=$host_alias ;;
- - *) target_alias=$nonopt ;;
- - esac ;;
- -esac
- -
- -target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
- -target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
- -target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
- -target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
- -echo "$ac_t""$target" 1>&6
- -
- -echo $ac_n "checking build system type""... $ac_c" 1>&6
- -echo "configure:716: checking build system type" >&5
- -
- -build_alias=$build
- -case "$build_alias" in
- -NONE)
- - case $nonopt in
- - NONE) build_alias=$host_alias ;;
- - *) build_alias=$nonopt ;;
- - esac ;;
- -esac
- -
- -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
- -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
- -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
- -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
- -echo "$ac_t""$build" 1>&6
- +test -n "$ac_init_help" && exit 0
- +if $ac_init_version; then
- + cat <<\_ACEOF
- +
- +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
- +Free Software Foundation, Inc.
- +This configure script is free software; the Free Software Foundation
- +gives unlimited permission to copy, distribute and modify it.
- +_ACEOF
- + exit 0
- +fi
- +exec 5>config.log
- +cat >&5 <<_ACEOF
- +This file contains any messages produced by compilers while
- +running configure, to aid debugging if configure makes a mistake.
-
- -test "$host_alias" != "$target_alias" &&
- - test "$program_prefix$program_suffix$program_transform_name" = \
- - NONENONEs,x,x, &&
- - program_prefix=${target_alias}-
- +It was created by $as_me, which was
- +generated by GNU Autoconf 2.57. Invocation command line was
-
- + $ $0 $@
-
- - echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
- -echo "configure:740: checking for strerror in -lcposix" >&5
- -ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
- -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - ac_save_LIBS="$LIBS"
- -LIBS="-lcposix $LIBS"
- -cat > conftest.$ac_ext <<EOF
- -#line 748 "configure"
- -#include "confdefs.h"
- -/* Override any gcc2 internal prototype to avoid an error. */
- -/* We use char because int might match the return type of a gcc2
- - builtin and then its argument prototype would still apply. */
- -char strerror();
- +_ACEOF
- +{
- +cat <<_ASUNAME
- +## --------- ##
- +## Platform. ##
- +## --------- ##
- +
- +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
- +uname -m = `(uname -m) 2>/dev/null || echo unknown`
- +uname -r = `(uname -r) 2>/dev/null || echo unknown`
- +uname -s = `(uname -s) 2>/dev/null || echo unknown`
- +uname -v = `(uname -v) 2>/dev/null || echo unknown`
- +
- +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
- +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
- +
- +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
- +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
- +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
- +hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
- +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
- +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
- +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
- -int main() {
- -strerror()
- -; return 0; }
- -EOF
- -if { (eval echo configure:759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- - rm -rf conftest*
- - eval "ac_cv_lib_$ac_lib_var=yes"
- -else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - eval "ac_cv_lib_$ac_lib_var=no"
- -fi
- -rm -f conftest*
- -LIBS="$ac_save_LIBS"
- +_ASUNAME
-
- -fi
- -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- - echo "$ac_t""yes" 1>&6
- - LIBS="$LIBS -lcposix"
- -else
- - echo "$ac_t""no" 1>&6
- -fi
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + echo "PATH: $as_dir"
- +done
-
- +} >&5
-
- +cat >&5 <<_ACEOF
-
-
- -# Find a good install program. We prefer a C program (faster),
- -# so one script is as good as another. But avoid the broken or
- -# incompatible versions:
- -# SysV /etc/install, /usr/sbin/install
- -# SunOS /usr/etc/install
- -# IRIX /sbin/install
- -# AIX /bin/install
- -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
- -# AFS /usr/afsws/bin/install, which mishandles nonexistent args
- -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
- -# ./install, which can be erroneously created by make from ./install.sh.
- -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
- -echo "configure:794: checking for a BSD compatible install" >&5
- -if test -z "$INSTALL"; then
- -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- - for ac_dir in $PATH; do
- - # Account for people who put trailing slashes in PATH elements.
- - case "$ac_dir/" in
- - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- - *)
- - # OSF1 and SCO ODT 3.0 have their own names for install.
- - # Don't use installbsd from OSF since it installs stuff as root
- - # by default.
- - for ac_prog in ginstall scoinst install; do
- - if test -f $ac_dir/$ac_prog; then
- - if test $ac_prog = install &&
- - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- - # AIX install. It has an incompatible calling convention.
- - :
- +## ----------- ##
- +## Core tests. ##
- +## ----------- ##
- +
- +_ACEOF
- +
- +
- +# Keep a trace of the command line.
- +# Strip out --no-create and --no-recursion so they do not pile up.
- +# Strip out --silent because we don't want to record it for future runs.
- +# Also quote any args containing shell meta-characters.
- +# Make two passes to allow for proper duplicate-argument suppression.
- +ac_configure_args=
- +ac_configure_args0=
- +ac_configure_args1=
- +ac_sep=
- +ac_must_keep_next=false
- +for ac_pass in 1 2
- +do
- + for ac_arg
- + do
- + case $ac_arg in
- + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- + -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- + | -silent | --silent | --silen | --sile | --sil)
- + continue ;;
- + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- + esac
- + case $ac_pass in
- + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- + 2)
- + ac_configure_args1="$ac_configure_args1 '$ac_arg'"
- + if test $ac_must_keep_next = true; then
- + ac_must_keep_next=false # Got value, back to normal.
- + else
- + case $ac_arg in
- + *=* | --config-cache | -C | -disable-* | --disable-* \
- + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- + | -with-* | --with-* | -without-* | --without-* | --x)
- + case "$ac_configure_args0 " in
- + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- + esac
- + ;;
- + -* ) ac_must_keep_next=true ;;
- + esac
- + fi
- + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- + # Get rid of the leading space.
- + ac_sep=" "
- + ;;
- + esac
- + done
- +done
- +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
- +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
- +
- +# When interrupted or exit'd, cleanup temporary files, and complete
- +# config.log. We remove comments because anyway the quotes in there
- +# would cause problems or look ugly.
- +# WARNING: Be sure not to use single quotes in there, as some shells,
- +# such as our DU 5.0 friend, will then `close' the trap.
- +trap 'exit_status=$?
- + # Save into config.log some information that might help in debugging.
- + {
- + echo
- +
- + cat <<\_ASBOX
- +## ---------------- ##
- +## Cache variables. ##
- +## ---------------- ##
- +_ASBOX
- + echo
- + # The following way of writing the cache mishandles newlines in values,
- +{
- + (set) 2>&1 |
- + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- + *ac_space=\ *)
- + sed -n \
- + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- + ;;
- + *)
- + sed -n \
- + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- + ;;
- + esac;
- +}
- + echo
- +
- + cat <<\_ASBOX
- +## ----------------- ##
- +## Output variables. ##
- +## ----------------- ##
- +_ASBOX
- + echo
- + for ac_var in $ac_subst_vars
- + do
- + eval ac_val=$`echo $ac_var`
- + echo "$ac_var='"'"'$ac_val'"'"'"
- + done | sort
- + echo
- +
- + if test -n "$ac_subst_files"; then
- + cat <<\_ASBOX
- +## ------------- ##
- +## Output files. ##
- +## ------------- ##
- +_ASBOX
- + echo
- + for ac_var in $ac_subst_files
- + do
- + eval ac_val=$`echo $ac_var`
- + echo "$ac_var='"'"'$ac_val'"'"'"
- + done | sort
- + echo
- + fi
- +
- + if test -s confdefs.h; then
- + cat <<\_ASBOX
- +## ----------- ##
- +## confdefs.h. ##
- +## ----------- ##
- +_ASBOX
- + echo
- + sed "/^$/d" confdefs.h | sort
- + echo
- + fi
- + test "$ac_signal" != 0 &&
- + echo "$as_me: caught signal $ac_signal"
- + echo "$as_me: exit $exit_status"
- + } >&5
- + rm -f core core.* *.core &&
- + rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
- + exit $exit_status
- + ' 0
- +for ac_signal in 1 2 13 15; do
- + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
- +done
- +ac_signal=0
- +
- +# confdefs.h avoids OS command line length limits that DEFS can exceed.
- +rm -rf conftest* confdefs.h
- +# AIX cpp loses on an empty file, so make sure it contains at least a newline.
- +echo >confdefs.h
- +
- +# Predefined preprocessor variables.
- +
- +cat >>confdefs.h <<_ACEOF
- +#define PACKAGE_NAME "$PACKAGE_NAME"
- +_ACEOF
- +
- +
- +cat >>confdefs.h <<_ACEOF
- +#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
- +_ACEOF
- +
- +
- +cat >>confdefs.h <<_ACEOF
- +#define PACKAGE_VERSION "$PACKAGE_VERSION"
- +_ACEOF
- +
- +
- +cat >>confdefs.h <<_ACEOF
- +#define PACKAGE_STRING "$PACKAGE_STRING"
- +_ACEOF
- +
- +
- +cat >>confdefs.h <<_ACEOF
- +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
- +_ACEOF
- +
- +
- +# Let the site file select an alternate cache file if it wants to.
- +# Prefer explicitly selected file to automatically selected ones.
- +if test -z "$CONFIG_SITE"; then
- + if test "x$prefix" != xNONE; then
- + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- - ac_cv_path_install="$ac_dir/$ac_prog -c"
- + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- + fi
- +fi
- +for ac_site_file in $CONFIG_SITE; do
- + if test -r "$ac_site_file"; then
- + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
- +echo "$as_me: loading site script $ac_site_file" >&6;}
- + sed 's/^/| /' "$ac_site_file" >&5
- + . "$ac_site_file"
- + fi
- +done
- +
- +if test -r "$cache_file"; then
- + # Some versions of bash will fail to source /dev/null (special
- + # files actually), so we avoid doing that.
- + if test -f "$cache_file"; then
- + { echo "$as_me:$LINENO: loading cache $cache_file" >&5
- +echo "$as_me: loading cache $cache_file" >&6;}
- + case $cache_file in
- + [\\/]* | ?:[\\/]* ) . $cache_file;;
- + *) . ./$cache_file;;
- + esac
- + fi
- +else
- + { echo "$as_me:$LINENO: creating cache $cache_file" >&5
- +echo "$as_me: creating cache $cache_file" >&6;}
- + >$cache_file
- +fi
- +
- +# Check that the precious variables saved in the cache have kept the same
- +# value.
- +ac_cache_corrupted=false
- +for ac_var in `(set) 2>&1 |
- + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
- + eval ac_old_set=\$ac_cv_env_${ac_var}_set
- + eval ac_new_set=\$ac_env_${ac_var}_set
- + eval ac_old_val="\$ac_cv_env_${ac_var}_value"
- + eval ac_new_val="\$ac_env_${ac_var}_value"
- + case $ac_old_set,$ac_new_set in
- + set,)
- + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
- +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- + ac_cache_corrupted=: ;;
- + ,set)
- + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
- +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- + ac_cache_corrupted=: ;;
- + ,);;
- + *)
- + if test "x$ac_old_val" != "x$ac_new_val"; then
- + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
- +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
- +echo "$as_me: former value: $ac_old_val" >&2;}
- + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
- +echo "$as_me: current value: $ac_new_val" >&2;}
- + ac_cache_corrupted=:
- + fi;;
- + esac
- + # Pass precious variables to config.status.
- + if test "$ac_new_set" = set; then
- + case $ac_new_val in
- + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- + *) ac_arg=$ac_var=$ac_new_val ;;
- + esac
- + case " $ac_configure_args " in
- + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- + esac
- + fi
- +done
- +if $ac_cache_corrupted; then
- + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
- +echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
- +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- + { (exit 1); exit 1; }; }
- +fi
- +
- +ac_ext=c
- +ac_cpp='$CPP $CPPFLAGS'
- +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- +ac_compiler_gnu=$ac_cv_c_compiler_gnu
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +ac_aux_dir=
- +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- + if test -f $ac_dir/install-sh; then
- + ac_aux_dir=$ac_dir
- + ac_install_sh="$ac_aux_dir/install-sh -c"
- + break
- + elif test -f $ac_dir/install.sh; then
- + ac_aux_dir=$ac_dir
- + ac_install_sh="$ac_aux_dir/install.sh -c"
- + break
- + elif test -f $ac_dir/shtool; then
- + ac_aux_dir=$ac_dir
- + ac_install_sh="$ac_aux_dir/shtool install -c"
- + break
- + fi
- +done
- +if test -z "$ac_aux_dir"; then
- + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
- +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
- + { (exit 1); exit 1; }; }
- +fi
- +ac_config_guess="$SHELL $ac_aux_dir/config.guess"
- +ac_config_sub="$SHELL $ac_aux_dir/config.sub"
- +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
- +
- +# Make sure we can run config.sub.
- +$ac_config_sub sun4 >/dev/null 2>&1 ||
- + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
- +echo "$as_me: error: cannot run $ac_config_sub" >&2;}
- + { (exit 1); exit 1; }; }
- +
- +echo "$as_me:$LINENO: checking build system type" >&5
- +echo $ECHO_N "checking build system type... $ECHO_C" >&6
- +if test "${ac_cv_build+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + ac_cv_build_alias=$build_alias
- +test -z "$ac_cv_build_alias" &&
- + ac_cv_build_alias=`$ac_config_guess`
- +test -z "$ac_cv_build_alias" &&
- + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
- +echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- + { (exit 1); exit 1; }; }
- +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
- + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
- +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
- + { (exit 1); exit 1; }; }
- +
- +fi
- +echo "$as_me:$LINENO: result: $ac_cv_build" >&5
- +echo "${ECHO_T}$ac_cv_build" >&6
- +build=$ac_cv_build
- +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
- +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
- +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
- +
- +
- +echo "$as_me:$LINENO: checking host system type" >&5
- +echo $ECHO_N "checking host system type... $ECHO_C" >&6
- +if test "${ac_cv_host+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + ac_cv_host_alias=$host_alias
- +test -z "$ac_cv_host_alias" &&
- + ac_cv_host_alias=$ac_cv_build_alias
- +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
- +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
- + { (exit 1); exit 1; }; }
- +
- +fi
- +echo "$as_me:$LINENO: result: $ac_cv_host" >&5
- +echo "${ECHO_T}$ac_cv_host" >&6
- +host=$ac_cv_host
- +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
- +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
- +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
- +
- +
- +echo "$as_me:$LINENO: checking target system type" >&5
- +echo $ECHO_N "checking target system type... $ECHO_C" >&6
- +if test "${ac_cv_target+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + ac_cv_target_alias=$target_alias
- +test "x$ac_cv_target_alias" = "x" &&
- + ac_cv_target_alias=$ac_cv_host_alias
- +ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
- + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
- +echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
- + { (exit 1); exit 1; }; }
- +
- +fi
- +echo "$as_me:$LINENO: result: $ac_cv_target" >&5
- +echo "${ECHO_T}$ac_cv_target" >&6
- +target=$ac_cv_target
- +target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
- +target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
- +target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
- +
- +
- +# The aliases save the names the user supplied, while $host etc.
- +# will get canonicalized.
- +test -n "$target_alias" &&
- + test "$program_prefix$program_suffix$program_transform_name" = \
- + NONENONEs,x,x, &&
- + program_prefix=${target_alias}-
- +ac_ext=c
- +ac_cpp='$CPP $CPPFLAGS'
- +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- +ac_compiler_gnu=$ac_cv_c_compiler_gnu
- +if test -n "$ac_tool_prefix"; then
- + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
- +set dummy ${ac_tool_prefix}gcc; ac_word=$2
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_CC+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + if test -n "$CC"; then
- + ac_cv_prog_CC="$CC" # Let the user override the test.
- +else
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_CC="${ac_tool_prefix}gcc"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- + fi
- +done
- +done
- +
- +fi
- +fi
- +CC=$ac_cv_prog_CC
- +if test -n "$CC"; then
- + echo "$as_me:$LINENO: result: $CC" >&5
- +echo "${ECHO_T}$CC" >&6
- +else
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- +fi
- +
- +fi
- +if test -z "$ac_cv_prog_CC"; then
- + ac_ct_CC=$CC
- + # Extract the first word of "gcc", so it can be a program name with args.
- +set dummy gcc; ac_word=$2
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + if test -n "$ac_ct_CC"; then
- + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
- +else
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_ac_ct_CC="gcc"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- + fi
- +done
- +done
- +
- +fi
- +fi
- +ac_ct_CC=$ac_cv_prog_ac_ct_CC
- +if test -n "$ac_ct_CC"; then
- + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
- +echo "${ECHO_T}$ac_ct_CC" >&6
- +else
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- +fi
- +
- + CC=$ac_ct_CC
- +else
- + CC="$ac_cv_prog_CC"
- +fi
- +
- +if test -z "$CC"; then
- + if test -n "$ac_tool_prefix"; then
- + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
- +set dummy ${ac_tool_prefix}cc; ac_word=$2
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_CC+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + if test -n "$CC"; then
- + ac_cv_prog_CC="$CC" # Let the user override the test.
- +else
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_CC="${ac_tool_prefix}cc"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
- +done
- +done
- +
- +fi
- +fi
- +CC=$ac_cv_prog_CC
- +if test -n "$CC"; then
- + echo "$as_me:$LINENO: result: $CC" >&5
- +echo "${ECHO_T}$CC" >&6
- +else
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- +fi
- +
- +fi
- +if test -z "$ac_cv_prog_CC"; then
- + ac_ct_CC=$CC
- + # Extract the first word of "cc", so it can be a program name with args.
- +set dummy cc; ac_word=$2
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + if test -n "$ac_ct_CC"; then
- + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
- +else
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_ac_ct_CC="cc"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- + fi
- +done
- +done
- +
- +fi
- +fi
- +ac_ct_CC=$ac_cv_prog_ac_ct_CC
- +if test -n "$ac_ct_CC"; then
- + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
- +echo "${ECHO_T}$ac_ct_CC" >&6
- +else
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- +fi
- +
- + CC=$ac_ct_CC
- +else
- + CC="$ac_cv_prog_CC"
- +fi
- +
- +fi
- +if test -z "$CC"; then
- + # Extract the first word of "cc", so it can be a program name with args.
- +set dummy cc; ac_word=$2
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_CC+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + if test -n "$CC"; then
- + ac_cv_prog_CC="$CC" # Let the user override the test.
- +else
- + ac_prog_rejected=no
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- + ac_prog_rejected=yes
- + continue
- + fi
- + ac_cv_prog_CC="cc"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- + fi
- +done
- +done
- +
- +if test $ac_prog_rejected = yes; then
- + # We found a bogon in the path, so make sure we never use it.
- + set dummy $ac_cv_prog_CC
- + shift
- + if test $# != 0; then
- + # We chose a different compiler from the bogus one.
- + # However, it has the same basename, so the bogon will be chosen
- + # first if we set CC to just the basename; use the full file name.
- + shift
- + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- + fi
- +fi
- +fi
- +fi
- +CC=$ac_cv_prog_CC
- +if test -n "$CC"; then
- + echo "$as_me:$LINENO: result: $CC" >&5
- +echo "${ECHO_T}$CC" >&6
- +else
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- +fi
- +
- +fi
- +if test -z "$CC"; then
- + if test -n "$ac_tool_prefix"; then
- + for ac_prog in cl
- + do
- + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
- +set dummy $ac_tool_prefix$ac_prog; ac_word=$2
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_CC+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + if test -n "$CC"; then
- + ac_cv_prog_CC="$CC" # Let the user override the test.
- +else
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- fi
- +done
- +done
- +
- +fi
- +fi
- +CC=$ac_cv_prog_CC
- +if test -n "$CC"; then
- + echo "$as_me:$LINENO: result: $CC" >&5
- +echo "${ECHO_T}$CC" >&6
- +else
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- +fi
- +
- + test -n "$CC" && break
- done
- +fi
- +if test -z "$CC"; then
- + ac_ct_CC=$CC
- + for ac_prog in cl
- +do
- + # Extract the first word of "$ac_prog", so it can be a program name with args.
- +set dummy $ac_prog; ac_word=$2
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + if test -n "$ac_ct_CC"; then
- + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
- +else
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_ac_ct_CC="$ac_prog"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- + fi
- +done
- +done
- +
- +fi
- +fi
- +ac_ct_CC=$ac_cv_prog_ac_ct_CC
- +if test -n "$ac_ct_CC"; then
- + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
- +echo "${ECHO_T}$ac_ct_CC" >&6
- +else
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- +fi
- +
- + test -n "$ac_ct_CC" && break
- +done
- +
- + CC=$ac_ct_CC
- +fi
- +
- +fi
- +
- +
- +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
- +See \`config.log' for more details." >&5
- +echo "$as_me: error: no acceptable C compiler found in \$PATH
- +See \`config.log' for more details." >&2;}
- + { (exit 1); exit 1; }; }
- +
- +# Provide some information about the compiler.
- +echo "$as_me:$LINENO:" \
- + "checking for C compiler version" >&5
- +ac_compiler=`set X $ac_compile; echo $2`
- +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- + (eval $ac_compiler --version </dev/null >&5) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }
- +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- + (eval $ac_compiler -v </dev/null >&5) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }
- +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- + (eval $ac_compiler -V </dev/null >&5) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }
- +
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +
- +int
- +main ()
- +{
- +
- + ;
- + return 0;
- +}
- +_ACEOF
- +ac_clean_files_save=$ac_clean_files
- +ac_clean_files="$ac_clean_files a.out a.exe b.out"
- +# Try to create an executable without -o first, disregard a.out.
- +# It will help us diagnose broken compilers, and finding out an intuition
- +# of exeext.
- +echo "$as_me:$LINENO: checking for C compiler default output" >&5
- +echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
- +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
- +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- + (eval $ac_link_default) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; then
- + # Find the output, starting from the most likely. This scheme is
- +# not robust to junk in `.', hence go to wildcards (a.*) only as a last
- +# resort.
- +
- +# Be careful to initialize this variable, since it used to be cached.
- +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
- +ac_cv_exeext=
- +# b.out is created by i960 compilers.
- +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
- +do
- + test -f "$ac_file" || continue
- + case $ac_file in
- + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
- + conftest.$ac_ext )
- + # This is the source file.
- + ;;
- + [ab].out )
- + # We found the default executable, but exeext='' is most
- + # certainly right.
- + break;;
- + *.* )
- + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- + # FIXME: I believe we export ac_cv_exeext for Libtool,
- + # but it would be cool to find out if it's true. Does anybody
- + # maintain Libtool? --akim.
- + export ac_cv_exeext
- + break;;
- + * )
- + break;;
- esac
- +done
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
- +See \`config.log' for more details." >&5
- +echo "$as_me: error: C compiler cannot create executables
- +See \`config.log' for more details." >&2;}
- + { (exit 77); exit 77; }; }
- +fi
- +
- +ac_exeext=$ac_cv_exeext
- +echo "$as_me:$LINENO: result: $ac_file" >&5
- +echo "${ECHO_T}$ac_file" >&6
- +
- +# Check the compiler produces executables we can run. If not, either
- +# the compiler is broken, or we cross compile.
- +echo "$as_me:$LINENO: checking whether the C compiler works" >&5
- +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
- +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
- +# If not cross compiling, check that we can run a simple program.
- +if test "$cross_compiling" != yes; then
- + if { ac_try='./$ac_file'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + cross_compiling=no
- + else
- + if test "$cross_compiling" = maybe; then
- + cross_compiling=yes
- + else
- + { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
- +If you meant to cross compile, use \`--host'.
- +See \`config.log' for more details." >&5
- +echo "$as_me: error: cannot run C compiled programs.
- +If you meant to cross compile, use \`--host'.
- +See \`config.log' for more details." >&2;}
- + { (exit 1); exit 1; }; }
- + fi
- + fi
- +fi
- +echo "$as_me:$LINENO: result: yes" >&5
- +echo "${ECHO_T}yes" >&6
- +
- +rm -f a.out a.exe conftest$ac_cv_exeext b.out
- +ac_clean_files=$ac_clean_files_save
- +# Check the compiler produces executables we can run. If not, either
- +# the compiler is broken, or we cross compile.
- +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
- +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
- +echo "$as_me:$LINENO: result: $cross_compiling" >&5
- +echo "${ECHO_T}$cross_compiling" >&6
- +
- +echo "$as_me:$LINENO: checking for suffix of executables" >&5
- +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; then
- + # If both `conftest.exe' and `conftest' are `present' (well, observable)
- +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
- +# work properly (i.e., refer to `conftest.exe'), while it won't with
- +# `rm'.
- +for ac_file in conftest.exe conftest conftest.*; do
- + test -f "$ac_file" || continue
- + case $ac_file in
- + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
- + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- + export ac_cv_exeext
- + break;;
- + * ) break;;
- + esac
- +done
- +else
- + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
- +See \`config.log' for more details." >&5
- +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
- +See \`config.log' for more details." >&2;}
- + { (exit 1); exit 1; }; }
- +fi
- +
- +rm -f conftest$ac_cv_exeext
- +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
- +echo "${ECHO_T}$ac_cv_exeext" >&6
- +
- +rm -f conftest.$ac_ext
- +EXEEXT=$ac_cv_exeext
- +ac_exeext=$EXEEXT
- +echo "$as_me:$LINENO: checking for suffix of object files" >&5
- +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
- +if test "${ac_cv_objext+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +
- +int
- +main ()
- +{
- +
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.o conftest.obj
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; then
- + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
- + case $ac_file in
- + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
- + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- + break;;
- + esac
- +done
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
- +See \`config.log' for more details." >&5
- +echo "$as_me: error: cannot compute suffix of object files: cannot compile
- +See \`config.log' for more details." >&2;}
- + { (exit 1); exit 1; }; }
- +fi
- +
- +rm -f conftest.$ac_cv_objext conftest.$ac_ext
- +fi
- +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
- +echo "${ECHO_T}$ac_cv_objext" >&6
- +OBJEXT=$ac_cv_objext
- +ac_objext=$OBJEXT
- +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
- +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
- +if test "${ac_cv_c_compiler_gnu+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +
- +int
- +main ()
- +{
- +#ifndef __GNUC__
- + choke me
- +#endif
- +
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + ac_compiler_gnu=yes
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +ac_compiler_gnu=no
- +fi
- +rm -f conftest.$ac_objext conftest.$ac_ext
- +ac_cv_c_compiler_gnu=$ac_compiler_gnu
- +
- +fi
- +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
- +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
- +GCC=`test $ac_compiler_gnu = yes && echo yes`
- +ac_test_CFLAGS=${CFLAGS+set}
- +ac_save_CFLAGS=$CFLAGS
- +CFLAGS="-g"
- +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
- +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
- +if test "${ac_cv_prog_cc_g+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +
- +int
- +main ()
- +{
- +
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + ac_cv_prog_cc_g=yes
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +ac_cv_prog_cc_g=no
- +fi
- +rm -f conftest.$ac_objext conftest.$ac_ext
- +fi
- +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
- +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
- +if test "$ac_test_CFLAGS" = set; then
- + CFLAGS=$ac_save_CFLAGS
- +elif test $ac_cv_prog_cc_g = yes; then
- + if test "$GCC" = yes; then
- + CFLAGS="-g -O2"
- + else
- + CFLAGS="-g"
- + fi
- +else
- + if test "$GCC" = yes; then
- + CFLAGS="-O2"
- + else
- + CFLAGS=
- + fi
- +fi
- +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
- +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
- +if test "${ac_cv_prog_cc_stdc+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + ac_cv_prog_cc_stdc=no
- +ac_save_CC=$CC
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +#include <stdarg.h>
- +#include <stdio.h>
- +#include <sys/types.h>
- +#include <sys/stat.h>
- +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
- +struct buf { int x; };
- +FILE * (*rcsopen) (struct buf *, struct stat *, int);
- +static char *e (p, i)
- + char **p;
- + int i;
- +{
- + return p[i];
- +}
- +static char *f (char * (*g) (char **, int), char **p, ...)
- +{
- + char *s;
- + va_list v;
- + va_start (v,p);
- + s = g (p, va_arg (v,int));
- + va_end (v);
- + return s;
- +}
- +int test (int i, double x);
- +struct s1 {int (*f) (int a);};
- +struct s2 {int (*f) (double a);};
- +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
- +int argc;
- +char **argv;
- +int
- +main ()
- +{
- +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- + ;
- + return 0;
- +}
- +_ACEOF
- +# Don't try gcc -ansi; that turns off useful extensions and
- +# breaks some systems' header files.
- +# AIX -qlanglvl=ansi
- +# Ultrix and OSF/1 -std1
- +# HP-UX 10.20 and later -Ae
- +# HP-UX older versions -Aa -D_HPUX_SOURCE
- +# SVR4 -Xc -D__EXTENSIONS__
- +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
- +do
- + CC="$ac_save_CC $ac_arg"
- + rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + ac_cv_prog_cc_stdc=$ac_arg
- +break
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +fi
- +rm -f conftest.$ac_objext
- +done
- +rm -f conftest.$ac_ext conftest.$ac_objext
- +CC=$ac_save_CC
- +
- +fi
- +
- +case "x$ac_cv_prog_cc_stdc" in
- + x|xno)
- + echo "$as_me:$LINENO: result: none needed" >&5
- +echo "${ECHO_T}none needed" >&6 ;;
- + *)
- + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
- +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- + CC="$CC $ac_cv_prog_cc_stdc" ;;
- +esac
- +
- +# Some people use a C++ compiler to compile C. Since we use `exit',
- +# in C++ we need to declare it. In case someone uses the same compiler
- +# for both compiling C and C++ we need to have the C++ compiler decide
- +# the declaration of exit, since it's the most demanding environment.
- +cat >conftest.$ac_ext <<_ACEOF
- +#ifndef __cplusplus
- + choke me
- +#endif
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + for ac_declaration in \
- + ''\
- + '#include <stdlib.h>' \
- + 'extern "C" void std::exit (int) throw (); using std::exit;' \
- + 'extern "C" void std::exit (int); using std::exit;' \
- + 'extern "C" void exit (int) throw ();' \
- + 'extern "C" void exit (int);' \
- + 'void exit (int);'
- +do
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +#include <stdlib.h>
- +$ac_declaration
- +int
- +main ()
- +{
- +exit (42);
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + :
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +continue
- +fi
- +rm -f conftest.$ac_objext conftest.$ac_ext
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +$ac_declaration
- +int
- +main ()
- +{
- +exit (42);
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + break
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +fi
- +rm -f conftest.$ac_objext conftest.$ac_ext
- +done
- +rm -f conftest*
- +if test -n "$ac_declaration"; then
- + echo '#ifdef __cplusplus' >>confdefs.h
- + echo $ac_declaration >>confdefs.h
- + echo '#endif' >>confdefs.h
- +fi
- +
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +fi
- +rm -f conftest.$ac_objext conftest.$ac_ext
- +ac_ext=c
- +ac_cpp='$CPP $CPPFLAGS'
- +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- +ac_compiler_gnu=$ac_cv_c_compiler_gnu
- +
- +
- +
- + echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5
- +echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6
- +if test "${ac_cv_lib_cposix_strerror+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + ac_check_lib_save_LIBS=$LIBS
- +LIBS="-lcposix $LIBS"
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +
- +/* Override any gcc2 internal prototype to avoid an error. */
- +#ifdef __cplusplus
- +extern "C"
- +#endif
- +/* We use char because int might match the return type of a gcc2
- + builtin and then its argument prototype would still apply. */
- +char strerror ();
- +int
- +main ()
- +{
- +strerror ();
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + ac_cv_lib_cposix_strerror=yes
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +ac_cv_lib_cposix_strerror=no
- +fi
- +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- +LIBS=$ac_check_lib_save_LIBS
- +fi
- +echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5
- +echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6
- +if test $ac_cv_lib_cposix_strerror = yes; then
- + LIBS="$LIBS -lcposix"
- +fi
- +
- +
- +
- +
- +am__api_version="1.6"
- +# Find a good install program. We prefer a C program (faster),
- +# so one script is as good as another. But avoid the broken or
- +# incompatible versions:
- +# SysV /etc/install, /usr/sbin/install
- +# SunOS /usr/etc/install
- +# IRIX /sbin/install
- +# AIX /bin/install
- +# AmigaOS /C/install, which installs bootblocks on floppy discs
- +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
- +# AFS /usr/afsws/bin/install, which mishandles nonexistent args
- +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
- +# ./install, which can be erroneously created by make from ./install.sh.
- +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
- +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
- +if test -z "$INSTALL"; then
- +if test "${ac_cv_path_install+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + # Account for people who put trailing slashes in PATH elements.
- +case $as_dir/ in
- + ./ | .// | /cC/* | \
- + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- + /usr/ucb/* ) ;;
- + *)
- + # OSF1 and SCO ODT 3.0 have their own names for install.
- + # Don't use installbsd from OSF since it installs stuff as root
- + # by default.
- + for ac_prog in ginstall scoinst install; do
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- + if test $ac_prog = install &&
- + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- + # AIX install. It has an incompatible calling convention.
- + :
- + elif test $ac_prog = install &&
- + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- + # program-specific install script used by HP pwplus--don't use.
- + :
- + else
- + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- + break 3
- + fi
- + fi
- done
- - IFS="$ac_save_IFS"
- + done
- + ;;
- +esac
- +done
- +
-
- fi
- if test "${ac_cv_path_install+set}" = set; then
- - INSTALL="$ac_cv_path_install"
- + INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- - INSTALL="$ac_install_sh"
- + INSTALL=$ac_install_sh
- fi
- fi
- -echo "$ac_t""$INSTALL" 1>&6
- +echo "$as_me:$LINENO: result: $INSTALL" >&5
- +echo "${ECHO_T}$INSTALL" >&6
-
- # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
- # It thinks the first close brace ends the variable substitution.
- test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
- -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
- +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
- test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
- -echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
- -echo "configure:847: checking whether build environment is sane" >&5
- +echo "$as_me:$LINENO: checking whether build environment is sane" >&5
- +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
- # Just in case
- sleep 1
- -echo timestamp > conftestfile
- +echo timestamp > conftest.file
- # Do `set' in a subshell so we don't clobber the current shell's
- # arguments. Must try -L first in case configure is actually a
- # symlink; some systems play weird games with the mod time of symlinks
- # (eg FreeBSD returns the mod time of the symlink's containing
- # directory).
- if (
- - set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- - set X `ls -t $srcdir/configure conftestfile`
- + set X `ls -t $srcdir/configure conftest.file`
- fi
- - if test "$*" != "X $srcdir/configure conftestfile" \
- - && test "$*" != "X conftestfile $srcdir/configure"; then
- + rm -f conftest.file
- + if test "$*" != "X $srcdir/configure conftest.file" \
- + && test "$*" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- - { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
- -alias in your environment" 1>&2; exit 1; }
- + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
- +alias in your environment" >&5
- +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
- +alias in your environment" >&2;}
- + { (exit 1); exit 1; }; }
- fi
-
- - test "$2" = conftestfile
- + test "$2" = conftest.file
- )
- then
- # Ok.
- :
- else
- - { echo "configure: error: newly created file is older than distributed files!
- -Check your system clock" 1>&2; exit 1; }
- + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
- +Check your system clock" >&5
- +echo "$as_me: error: newly created file is older than distributed files!
- +Check your system clock" >&2;}
- + { (exit 1); exit 1; }; }
- +fi
- +echo "$as_me:$LINENO: result: yes" >&5
- +echo "${ECHO_T}yes" >&6
- +test "$program_prefix" != NONE &&
- + program_transform_name="s,^,$program_prefix,;$program_transform_name"
- +# Use a double $ so make ignores it.
- +test "$program_suffix" != NONE &&
- + program_transform_name="s,\$,$program_suffix,;$program_transform_name"
- +# Double any \ or $. echo might interpret backslashes.
- +# By default was `s,x,x', remove it if useless.
- +cat <<\_ACEOF >conftest.sed
- +s/[\\$]/&&/g;s/;s,x,x,$//
- +_ACEOF
- +program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
- +rm conftest.sed
- +
- +
- +# expand $ac_aux_dir to an absolute path
- +am_aux_dir=`cd $ac_aux_dir && pwd`
- +
- +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
- +# Use eval to expand $SHELL
- +if eval "$MISSING --run true"; then
- + am_missing_run="$MISSING --run "
- +else
- + am_missing_run=
- + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
- +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
- +fi
- +
- +for ac_prog in gawk mawk nawk awk
- +do
- + # Extract the first word of "$ac_prog", so it can be a program name with args.
- +set dummy $ac_prog; ac_word=$2
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_AWK+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + if test -n "$AWK"; then
- + ac_cv_prog_AWK="$AWK" # Let the user override the test.
- +else
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_AWK="$ac_prog"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- + fi
- +done
- +done
- +
- fi
- -rm -f conftest*
- -echo "$ac_t""yes" 1>&6
- -if test "$program_transform_name" = s,x,x,; then
- - program_transform_name=
- -else
- - # Double any \ or $. echo might interpret backslashes.
- - cat <<\EOF_SED > conftestsed
- -s,\\,\\\\,g; s,\$,$$,g
- -EOF_SED
- - program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- - rm -f conftestsed
- fi
- -test "$program_prefix" != NONE &&
- - program_transform_name="s,^,${program_prefix},; $program_transform_name"
- -# Use a double $ so make ignores it.
- -test "$program_suffix" != NONE &&
- - program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
- +AWK=$ac_cv_prog_AWK
- +if test -n "$AWK"; then
- + echo "$as_me:$LINENO: result: $AWK" >&5
- +echo "${ECHO_T}$AWK" >&6
- +else
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- +fi
-
- -# sed with no file args requires a program.
- -test "$program_transform_name" = "" && program_transform_name="s,x,x,"
- + test -n "$AWK" && break
- +done
-
- -echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
- -echo "configure:904: checking whether ${MAKE-make} sets \${MAKE}" >&5
- -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
- -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
- +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
- +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
- +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - cat > conftestmake <<\EOF
- + cat >conftest.make <<\_ACEOF
- all:
- - @echo 'ac_maketemp="${MAKE}"'
- -EOF
- + @echo 'ac_maketemp="$(MAKE)"'
- +_ACEOF
- # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
- -eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
- +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
- if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
- else
- eval ac_cv_prog_make_${ac_make}_set=no
- fi
- -rm -f conftestmake
- +rm -f conftest.make
- fi
- if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- - echo "$ac_t""yes" 1>&6
- + echo "$as_me:$LINENO: result: yes" >&5
- +echo "${ECHO_T}yes" >&6
- SET_MAKE=
- else
- - echo "$ac_t""no" 1>&6
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- SET_MAKE="MAKE=${MAKE-make}"
- fi
-
- +rm -f .deps 2>/dev/null
- +mkdir .deps 2>/dev/null
- +if test -d .deps; then
- + DEPDIR=.deps
- +else
- + # MS-DOS does not allow filenames that begin with a dot.
- + DEPDIR=_deps
- +fi
- +rmdir .deps 2>/dev/null
-
- -PACKAGE=bfd
-
- -VERSION=2.14
- + ac_config_commands="$ac_config_commands depfiles"
-
- -if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- - { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
- +
- +am_make=${MAKE-make}
- +cat > confinc << 'END'
- +doit:
- + @echo done
- +END
- +# If we don't find an include directive, just comment out the code.
- +echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
- +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
- +am__include="#"
- +am__quote=
- +_am_result=none
- +# First try GNU make style include.
- +echo "include confinc" > confmf
- +# We grep out `Entering directory' and `Leaving directory'
- +# messages which can occur if `w' ends up in MAKEFLAGS.
- +# In particular we don't look at `^make:' because GNU make might
- +# be invoked under some other name (usually "gmake"), in which
- +# case it prints its new name instead of `make'.
- +if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
- + am__include=include
- + am__quote=
- + _am_result=GNU
- +fi
- +# Now try BSD make style include.
- +if test "$am__include" = "#"; then
- + echo '.include "confinc"' > confmf
- + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
- + am__include=.include
- + am__quote="\""
- + _am_result=BSD
- + fi
- fi
- -cat >> confdefs.h <<EOF
- -#define PACKAGE "$PACKAGE"
- -EOF
-
- -cat >> confdefs.h <<EOF
- -#define VERSION "$VERSION"
- -EOF
-
- +echo "$as_me:$LINENO: result: $_am_result" >&5
- +echo "${ECHO_T}$_am_result" >&6
- +rm -f confinc confmf
-
- +# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
- +if test "${enable_dependency_tracking+set}" = set; then
- + enableval="$enable_dependency_tracking"
-
- -missing_dir=`cd $ac_aux_dir && pwd`
- -echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
- -echo "configure:950: checking for working aclocal" >&5
- -# Run test in a subshell; some versions of sh will print an error if
- -# an executable is not found, even if stderr is redirected.
- -# Redirect stdin to placate older versions of autoconf. Sigh.
- -if (aclocal --version) < /dev/null > /dev/null 2>&1; then
- - ACLOCAL=aclocal
- - echo "$ac_t""found" 1>&6
- -else
- - ACLOCAL="$missing_dir/missing aclocal"
- - echo "$ac_t""missing" 1>&6
- -fi
- -
- -echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
- -echo "configure:963: checking for working autoconf" >&5
- -# Run test in a subshell; some versions of sh will print an error if
- -# an executable is not found, even if stderr is redirected.
- -# Redirect stdin to placate older versions of autoconf. Sigh.
- -if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- - AUTOCONF=autoconf
- - echo "$ac_t""found" 1>&6
- -else
- - AUTOCONF="$missing_dir/missing autoconf"
- - echo "$ac_t""missing" 1>&6
- -fi
- -
- -echo $ac_n "checking for working automake""... $ac_c" 1>&6
- -echo "configure:976: checking for working automake" >&5
- -# Run test in a subshell; some versions of sh will print an error if
- -# an executable is not found, even if stderr is redirected.
- -# Redirect stdin to placate older versions of autoconf. Sigh.
- -if (automake --version) < /dev/null > /dev/null 2>&1; then
- - AUTOMAKE=automake
- - echo "$ac_t""found" 1>&6
- -else
- - AUTOMAKE="$missing_dir/missing automake"
- - echo "$ac_t""missing" 1>&6
- -fi
- -
- -echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
- -echo "configure:989: checking for working autoheader" >&5
- -# Run test in a subshell; some versions of sh will print an error if
- -# an executable is not found, even if stderr is redirected.
- -# Redirect stdin to placate older versions of autoconf. Sigh.
- -if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- - AUTOHEADER=autoheader
- - echo "$ac_t""found" 1>&6
- -else
- - AUTOHEADER="$missing_dir/missing autoheader"
- - echo "$ac_t""missing" 1>&6
- -fi
- -
- -echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
- -echo "configure:1002: checking for working makeinfo" >&5
- -# Run test in a subshell; some versions of sh will print an error if
- -# an executable is not found, even if stderr is redirected.
- -# Redirect stdin to placate older versions of autoconf. Sigh.
- -if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- - MAKEINFO=makeinfo
- - echo "$ac_t""found" 1>&6
- -else
- - MAKEINFO="$missing_dir/missing makeinfo"
- - echo "$ac_t""missing" 1>&6
- +fi;
- +if test "x$enable_dependency_tracking" != xno; then
- + am_depcomp="$ac_aux_dir/depcomp"
- + AMDEPBACKSLASH='\'
- fi
-
-
- -# Uncomment the next line to remove the date from the reported bfd version
- -#is_release=y
- +if test "x$enable_dependency_tracking" != xno; then
- + AMDEP_TRUE=
- + AMDEP_FALSE='#'
- +else
- + AMDEP_TRUE='#'
- + AMDEP_FALSE=
- +fi
-
- -bfd_version=`echo "${VERSION}" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$/\1\2\3\4\5/'`
-
- -bfd_version_string="\"${VERSION}\""
- -if test x${is_release} = x; then
- - bfd_version_date=`sed -n -e 's/.*DATE //p' < ${srcdir}/version.h`
- - bfd_version_string="\"${VERSION} ${bfd_version_date}\""
- +
- + # test to see if srcdir already configured
- +if test "`cd $srcdir && pwd`" != "`pwd`" &&
- + test -f $srcdir/config.status; then
- + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
- +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
- + { (exit 1); exit 1; }; }
- fi
-
- +# Define the identity of the package.
- + PACKAGE=bfd
- + VERSION=2.14
-
-
- -if test $host != $build; then
- - ac_tool_prefix=${host_alias}-
- -else
- - ac_tool_prefix=
- -fi
- +cat >>confdefs.h <<_ACEOF
- +#define PACKAGE "$PACKAGE"
- +_ACEOF
-
- -# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
- -set dummy ${ac_tool_prefix}ar; ac_word=$2
- -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- -echo "configure:1037: checking for $ac_word" >&5
- -if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - if test -n "$AR"; then
- - ac_cv_prog_AR="$AR" # Let the user override the test.
- -else
- - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- - ac_dummy="$PATH"
- - for ac_dir in $ac_dummy; do
- - test -z "$ac_dir" && ac_dir=.
- - if test -f $ac_dir/$ac_word; then
- - ac_cv_prog_AR="${ac_tool_prefix}ar"
- - break
- - fi
- - done
- - IFS="$ac_save_ifs"
- - test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
- -fi
- -fi
- -AR="$ac_cv_prog_AR"
- -if test -n "$AR"; then
- - echo "$ac_t""$AR" 1>&6
- -else
- - echo "$ac_t""no" 1>&6
- -fi
-
- +cat >>confdefs.h <<_ACEOF
- +#define VERSION "$VERSION"
- +_ACEOF
- +
- +# Some tools Automake needs.
-
- +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
-
- -# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
- -set dummy ${ac_tool_prefix}ranlib; ac_word=$2
- -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- -echo "configure:1069: checking for $ac_word" >&5
- -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +
- +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
- +
- +
- +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
- +
- +
- +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
- +
- +
- +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
- +
- +
- +AMTAR=${AMTAR-"${am_missing_run}tar"}
- +
- +install_sh=${install_sh-"$am_aux_dir/install-sh"}
- +
- +# Installed binaries are usually stripped using `strip' when the user
- +# run `make install-strip'. However `strip' might not be the right
- +# tool to use in cross-compilation environments, therefore Automake
- +# will honor the `STRIP' environment variable to overrule this program.
- +if test "$cross_compiling" != no; then
- + if test -n "$ac_tool_prefix"; then
- + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
- +set dummy ${ac_tool_prefix}strip; ac_word=$2
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_STRIP+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - if test -n "$RANLIB"; then
- - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
- + if test -n "$STRIP"; then
- + ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
- else
- - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- - ac_dummy="$PATH"
- - for ac_dir in $ac_dummy; do
- - test -z "$ac_dir" && ac_dir=.
- - if test -f $ac_dir/$ac_word; then
- - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- - break
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- fi
- - done
- - IFS="$ac_save_ifs"
- +done
- +done
- +
- fi
- fi
- -RANLIB="$ac_cv_prog_RANLIB"
- -if test -n "$RANLIB"; then
- - echo "$ac_t""$RANLIB" 1>&6
- +STRIP=$ac_cv_prog_STRIP
- +if test -n "$STRIP"; then
- + echo "$as_me:$LINENO: result: $STRIP" >&5
- +echo "${ECHO_T}$STRIP" >&6
- else
- - echo "$ac_t""no" 1>&6
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
-
- -
- -if test -z "$ac_cv_prog_RANLIB"; then
- -if test -n "$ac_tool_prefix"; then
- - # Extract the first word of "ranlib", so it can be a program name with args.
- -set dummy ranlib; ac_word=$2
- -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- -echo "configure:1101: checking for $ac_word" >&5
- -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +fi
- +if test -z "$ac_cv_prog_STRIP"; then
- + ac_ct_STRIP=$STRIP
- + # Extract the first word of "strip", so it can be a program name with args.
- +set dummy strip; ac_word=$2
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - if test -n "$RANLIB"; then
- - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
- + if test -n "$ac_ct_STRIP"; then
- + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
- else
- - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- - ac_dummy="$PATH"
- - for ac_dir in $ac_dummy; do
- - test -z "$ac_dir" && ac_dir=.
- - if test -f $ac_dir/$ac_word; then
- - ac_cv_prog_RANLIB="ranlib"
- - break
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_ac_ct_STRIP="strip"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- fi
- - done
- - IFS="$ac_save_ifs"
- - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
- +done
- +done
- +
- + test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
- fi
- fi
- -RANLIB="$ac_cv_prog_RANLIB"
- -if test -n "$RANLIB"; then
- - echo "$ac_t""$RANLIB" 1>&6
- +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
- +if test -n "$ac_ct_STRIP"; then
- + echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
- +echo "${ECHO_T}$ac_ct_STRIP" >&6
- else
- - echo "$ac_t""no" 1>&6
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
-
- + STRIP=$ac_ct_STRIP
- else
- - RANLIB=":"
- + STRIP="$ac_cv_prog_STRIP"
- fi
- +
- fi
- +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-
- +# We need awk for the "check" target. The system "awk" is bad on
- +# some platforms.
-
- -# Check whether --enable-shared or --disable-shared was given.
- -if test "${enable_shared+set}" = set; then
- - enableval="$enable_shared"
- - p=${PACKAGE-default}
- -case $enableval in
- -yes) enable_shared=yes ;;
- -no) enable_shared=no ;;
- -*)
- - enable_shared=no
- - # Look at the argument we got. We use all the common list separators.
- - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- - for pkg in $enableval; do
- - if test "X$pkg" = "X$p"; then
- - enable_shared=yes
- - fi
- - done
- - IFS="$ac_save_ifs"
- - ;;
- -esac
- +
- +depcc="$CC" am_compiler_list=
- +
- +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
- +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
- +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - enable_shared=no
- -fi
- + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- + # We make a subdir and do the tests there. Otherwise we can end up
- + # making bogus files that we don't know about and never remove. For
- + # instance it was reported that on HP-UX the gcc test will end up
- + # making a dummy file named `D' -- because `-MD' means `put the output
- + # in D'.
- + mkdir conftest.dir
- + # Copy depcomp to subdir because otherwise we won't find it if we're
- + # using a relative directory.
- + cp "$am_depcomp" conftest.dir
- + cd conftest.dir
-
- + am_cv_CC_dependencies_compiler_type=none
- + if test "$am_compiler_list" = ""; then
- + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
- + fi
- + for depmode in $am_compiler_list; do
- + # We need to recreate these files for each test, as the compiler may
- + # overwrite some of them when testing with obscure command lines.
- + # This happens at least with the AIX C compiler.
- + echo '#include "conftest.h"' > conftest.c
- + echo 'int i;' > conftest.h
- + echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
-
- -# Check whether --enable-static or --disable-static was given.
- -if test "${enable_static+set}" = set; then
- - enableval="$enable_static"
- - p=${PACKAGE-default}
- -case $enableval in
- -yes) enable_static=yes ;;
- -no) enable_static=no ;;
- -*)
- - enable_static=no
- - # Look at the argument we got. We use all the common list separators.
- - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- - for pkg in $enableval; do
- - if test "X$pkg" = "X$p"; then
- - enable_static=yes
- + case $depmode in
- + nosideeffect)
- + # after this tag, mechanisms are not by side-effect, so they'll
- + # only be used when explicitly requested
- + if test "x$enable_dependency_tracking" = xyes; then
- + continue
- + else
- + break
- fi
- - done
- - IFS="$ac_save_ifs"
- ;;
- -esac
- -else
- - enable_static=yes
- -fi
- -
- -# Check whether --enable-fast-install or --disable-fast-install was given.
- -if test "${enable_fast_install+set}" = set; then
- - enableval="$enable_fast_install"
- - p=${PACKAGE-default}
- -case $enableval in
- -yes) enable_fast_install=yes ;;
- -no) enable_fast_install=no ;;
- -*)
- - enable_fast_install=no
- - # Look at the argument we got. We use all the common list separators.
- - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- - for pkg in $enableval; do
- - if test "X$pkg" = "X$p"; then
- - enable_fast_install=yes
- + none) break ;;
- + esac
- + # We check with `-c' and `-o' for the sake of the "dashmstdout"
- + # mode. It turns out that the SunPro C++ compiler does not properly
- + # handle `-M -o', and we need to detect this.
- + if depmode=$depmode \
- + source=conftest.c object=conftest.o \
- + depfile=conftest.Po tmpdepfile=conftest.TPo \
- + $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
- + grep conftest.h conftest.Po > /dev/null 2>&1 &&
- + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- + am_cv_CC_dependencies_compiler_type=$depmode
- + break
- fi
- done
- - IFS="$ac_save_ifs"
- - ;;
- -esac
- +
- + cd ..
- + rm -rf conftest.dir
- else
- - enable_fast_install=yes
- + am_cv_CC_dependencies_compiler_type=none
- fi
-
- -# Extract the first word of "gcc", so it can be a program name with args.
- -set dummy gcc; ac_word=$2
- -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- -echo "configure:1207: checking for $ac_word" >&5
- -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +fi
- +echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
- +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
- +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
- +
- +
- +
- +# Uncomment the next line to remove the date from the reported bfd version
- +#is_release=y
- +
- +bfd_version=`echo "${VERSION}" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$/\1\2\3\4\5/'`
- +
- +bfd_version_string="\"${VERSION}\""
- +if test x${is_release} = x; then
- + bfd_version_date=`sed -n -e 's/.*DATE //p' < ${srcdir}/version.h`
- + bfd_version_string="\"${VERSION} ${bfd_version_date} (Amiga, Inc. build 20031201)\""
- +fi
- +
- +
- +
- +if test -n "$ac_tool_prefix"; then
- + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
- +set dummy ${ac_tool_prefix}ar; ac_word=$2
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_AR+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - if test -n "$CC"; then
- - ac_cv_prog_CC="$CC" # Let the user override the test.
- + if test -n "$AR"; then
- + ac_cv_prog_AR="$AR" # Let the user override the test.
- else
- - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- - ac_dummy="$PATH"
- - for ac_dir in $ac_dummy; do
- - test -z "$ac_dir" && ac_dir=.
- - if test -f $ac_dir/$ac_word; then
- - ac_cv_prog_CC="gcc"
- - break
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_AR="${ac_tool_prefix}ar"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- fi
- - done
- - IFS="$ac_save_ifs"
- +done
- +done
- +
- fi
- fi
- -CC="$ac_cv_prog_CC"
- -if test -n "$CC"; then
- - echo "$ac_t""$CC" 1>&6
- +AR=$ac_cv_prog_AR
- +if test -n "$AR"; then
- + echo "$as_me:$LINENO: result: $AR" >&5
- +echo "${ECHO_T}$AR" >&6
- else
- - echo "$ac_t""no" 1>&6
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
-
- -if test -z "$CC"; then
- - # Extract the first word of "cc", so it can be a program name with args.
- -set dummy cc; ac_word=$2
- -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- -echo "configure:1237: checking for $ac_word" >&5
- -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +fi
- +if test -z "$ac_cv_prog_AR"; then
- + ac_ct_AR=$AR
- + # Extract the first word of "ar", so it can be a program name with args.
- +set dummy ar; ac_word=$2
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - if test -n "$CC"; then
- - ac_cv_prog_CC="$CC" # Let the user override the test.
- + if test -n "$ac_ct_AR"; then
- + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
- else
- - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- - ac_prog_rejected=no
- - ac_dummy="$PATH"
- - for ac_dir in $ac_dummy; do
- - test -z "$ac_dir" && ac_dir=.
- - if test -f $ac_dir/$ac_word; then
- - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- - ac_prog_rejected=yes
- - continue
- - fi
- - ac_cv_prog_CC="cc"
- - break
- - fi
- - done
- - IFS="$ac_save_ifs"
- -if test $ac_prog_rejected = yes; then
- - # We found a bogon in the path, so make sure we never use it.
- - set dummy $ac_cv_prog_CC
- - shift
- - if test $# -gt 0; then
- - # We chose a different compiler from the bogus one.
- - # However, it has the same basename, so the bogon will be chosen
- - # first if we set CC to just the basename; use the full file name.
- - shift
- - set dummy "$ac_dir/$ac_word" "$@"
- - shift
- - ac_cv_prog_CC="$@"
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_ac_ct_AR="ar"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- fi
- +done
- +done
- +
- fi
- fi
- +ac_ct_AR=$ac_cv_prog_ac_ct_AR
- +if test -n "$ac_ct_AR"; then
- + echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
- +echo "${ECHO_T}$ac_ct_AR" >&6
- +else
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
- -CC="$ac_cv_prog_CC"
- -if test -n "$CC"; then
- - echo "$ac_t""$CC" 1>&6
- +
- + AR=$ac_ct_AR
- else
- - echo "$ac_t""no" 1>&6
- + AR="$ac_cv_prog_AR"
- fi
-
- - if test -z "$CC"; then
- - case "`uname -s`" in
- - *win32* | *WIN32*)
- - # Extract the first word of "cl", so it can be a program name with args.
- -set dummy cl; ac_word=$2
- -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- -echo "configure:1288: checking for $ac_word" >&5
- -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +if test -n "$ac_tool_prefix"; then
- + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
- +set dummy ${ac_tool_prefix}ranlib; ac_word=$2
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_RANLIB+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - if test -n "$CC"; then
- - ac_cv_prog_CC="$CC" # Let the user override the test.
- + if test -n "$RANLIB"; then
- + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
- else
- - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- - ac_dummy="$PATH"
- - for ac_dir in $ac_dummy; do
- - test -z "$ac_dir" && ac_dir=.
- - if test -f $ac_dir/$ac_word; then
- - ac_cv_prog_CC="cl"
- - break
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- fi
- - done
- - IFS="$ac_save_ifs"
- +done
- +done
- +
- fi
- fi
- -CC="$ac_cv_prog_CC"
- -if test -n "$CC"; then
- - echo "$ac_t""$CC" 1>&6
- +RANLIB=$ac_cv_prog_RANLIB
- +if test -n "$RANLIB"; then
- + echo "$as_me:$LINENO: result: $RANLIB" >&5
- +echo "${ECHO_T}$RANLIB" >&6
- else
- - echo "$ac_t""no" 1>&6
- -fi
- - ;;
- - esac
- - fi
- - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
-
- -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
- -echo "configure:1320: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
- -
- -ac_ext=c
- -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- -ac_cpp='$CPP $CPPFLAGS'
- -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
- -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- -cross_compiling=$ac_cv_prog_cc_cross
- -
- -cat > conftest.$ac_ext << EOF
- -
- -#line 1331 "configure"
- -#include "confdefs.h"
- -
- -main(){return(0);}
- -EOF
- -if { (eval echo configure:1336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- - ac_cv_prog_cc_works=yes
- - # If we can't run a trivial program, we are probably using a cross compiler.
- - if (./conftest; exit) 2>/dev/null; then
- - ac_cv_prog_cc_cross=no
- - else
- - ac_cv_prog_cc_cross=yes
- - fi
- -else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - ac_cv_prog_cc_works=no
- fi
- -rm -fr conftest*
- -ac_ext=c
- -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- -ac_cpp='$CPP $CPPFLAGS'
- -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
- -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- -cross_compiling=$ac_cv_prog_cc_cross
- -
- -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
- -if test $ac_cv_prog_cc_works = no; then
- - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
- -fi
- -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
- -echo "configure:1362: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
- -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
- -cross_compiling=$ac_cv_prog_cc_cross
- -
- -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
- -echo "configure:1367: checking whether we are using GNU C" >&5
- -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +if test -z "$ac_cv_prog_RANLIB"; then
- + ac_ct_RANLIB=$RANLIB
- + # Extract the first word of "ranlib", so it can be a program name with args.
- +set dummy ranlib; ac_word=$2
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - cat > conftest.c <<EOF
- -#ifdef __GNUC__
- - yes;
- -#endif
- -EOF
- -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- - ac_cv_prog_gcc=yes
- + if test -n "$ac_ct_RANLIB"; then
- + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
- else
- - ac_cv_prog_gcc=no
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_ac_ct_RANLIB="ranlib"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- + fi
- +done
- +done
- +
- + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
- fi
- fi
- -
- -echo "$ac_t""$ac_cv_prog_gcc" 1>&6
- -
- -if test $ac_cv_prog_gcc = yes; then
- - GCC=yes
- +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
- +if test -n "$ac_ct_RANLIB"; then
- + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
- +echo "${ECHO_T}$ac_ct_RANLIB" >&6
- else
- - GCC=
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
-
- -ac_test_CFLAGS="${CFLAGS+set}"
- -ac_save_CFLAGS="$CFLAGS"
- -CFLAGS=
- -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
- -echo "configure:1395: checking whether ${CC-cc} accepts -g" >&5
- -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- + RANLIB=$ac_ct_RANLIB
- else
- - echo 'void f(){}' > conftest.c
- -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- - ac_cv_prog_cc_g=yes
- -else
- - ac_cv_prog_cc_g=no
- + RANLIB="$ac_cv_prog_RANLIB"
- fi
- -rm -f conftest*
-
- -fi
-
- -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- -if test "$ac_test_CFLAGS" = set; then
- - CFLAGS="$ac_save_CFLAGS"
- -elif test $ac_cv_prog_cc_g = yes; then
- - if test "$GCC" = yes; then
- - CFLAGS="-g -O2"
- - else
- - CFLAGS="-g"
- +# Check whether --enable-shared or --disable-shared was given.
- +if test "${enable_shared+set}" = set; then
- + enableval="$enable_shared"
- + p=${PACKAGE-default}
- +case $enableval in
- +yes) enable_shared=yes ;;
- +no) enable_shared=no ;;
- +*)
- + enable_shared=no
- + # Look at the argument we got. We use all the common list separators.
- + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- + for pkg in $enableval; do
- + if test "X$pkg" = "X$p"; then
- + enable_shared=yes
- fi
- + done
- + IFS="$ac_save_ifs"
- + ;;
- +esac
- else
- - if test "$GCC" = yes; then
- - CFLAGS="-O2"
- - else
- - CFLAGS=
- + enable_shared=no
- +fi;
- +
- +# Check whether --enable-static or --disable-static was given.
- +if test "${enable_static+set}" = set; then
- + enableval="$enable_static"
- + p=${PACKAGE-default}
- +case $enableval in
- +yes) enable_static=yes ;;
- +no) enable_static=no ;;
- +*)
- + enable_static=no
- + # Look at the argument we got. We use all the common list separators.
- + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- + for pkg in $enableval; do
- + if test "X$pkg" = "X$p"; then
- + enable_static=yes
- fi
- -fi
- + done
- + IFS="$ac_save_ifs"
- + ;;
- +esac
- +else
- + enable_static=yes
- +fi;
- +# Check whether --enable-fast-install or --disable-fast-install was given.
- +if test "${enable_fast_install+set}" = set; then
- + enableval="$enable_fast_install"
- + p=${PACKAGE-default}
- +case $enableval in
- +yes) enable_fast_install=yes ;;
- +no) enable_fast_install=no ;;
- +*)
- + enable_fast_install=no
- + # Look at the argument we got. We use all the common list separators.
- + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- + for pkg in $enableval; do
- + if test "X$pkg" = "X$p"; then
- + enable_fast_install=yes
- + fi
- + done
- + IFS="$ac_save_ifs"
- + ;;
- +esac
- +else
- + enable_fast_install=yes
- +fi;
-
- # Check whether --with-gnu-ld or --without-gnu-ld was given.
- if test "${with_gnu_ld+set}" = set; then
- @@ -1428,13 +3071,12 @@
- test "$withval" = no || with_gnu_ld=yes
- else
- with_gnu_ld=no
- -fi
- -
- +fi;
- ac_prog=ld
- if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- - echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
- -echo "configure:1438: checking for ld used by GCC" >&5
- + echo "$as_me:$LINENO: checking for ld used by GCC" >&5
- +echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- @@ -1463,14 +3105,14 @@
- ;;
- esac
- elif test "$with_gnu_ld" = yes; then
- - echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
- -echo "configure:1468: checking for GNU ld" >&5
- + echo "$as_me:$LINENO: checking for GNU ld" >&5
- +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
- else
- - echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
- -echo "configure:1471: checking for non-GNU ld" >&5
- + echo "$as_me:$LINENO: checking for non-GNU ld" >&5
- +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
- fi
- -if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +if test "${lt_cv_path_LD+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- @@ -1496,15 +3138,19 @@
-
- LD="$lt_cv_path_LD"
- if test -n "$LD"; then
- - echo "$ac_t""$LD" 1>&6
- + echo "$as_me:$LINENO: result: $LD" >&5
- +echo "${ECHO_T}$LD" >&6
- else
- - echo "$ac_t""no" 1>&6
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
- -test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
- -echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
- -echo "configure:1506: checking if the linker ($LD) is GNU ld" >&5
- -if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
- +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
- + { (exit 1); exit 1; }; }
- +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
- +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
- +if test "${lt_cv_prog_gnu_ld+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- # I'd rather use --version here, but apparently some GNU ld's only accept -v.
- if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- @@ -1513,27 +3159,27 @@
- lt_cv_prog_gnu_ld=no
- fi
- fi
- -
- -echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
- +echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
- +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
- with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
- -echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
- -echo "configure:1523: checking for $LD option to reload object files" >&5
- -if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
- +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
- +if test "${lt_cv_ld_reload_flag+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- lt_cv_ld_reload_flag='-r'
- fi
- -
- -echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
- +echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
- +echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
- reload_flag=$lt_cv_ld_reload_flag
- test -n "$reload_flag" && reload_flag=" $reload_flag"
-
- -echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
- -echo "configure:1535: checking for BSD-compatible nm" >&5
- -if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
- +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
- +if test "${lt_cv_path_NM+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- if test -n "$NM"; then
- # Let the user override the test.
- @@ -1566,33 +3212,24 @@
- fi
-
- NM="$lt_cv_path_NM"
- -echo "$ac_t""$NM" 1>&6
- -
- -echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
- -echo "configure:1573: checking whether ln -s works" >&5
- -if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - rm -f conftestdata
- -if ln -s X conftestdata 2>/dev/null
- -then
- - rm -f conftestdata
- - ac_cv_prog_LN_S="ln -s"
- -else
- - ac_cv_prog_LN_S=ln
- -fi
- -fi
- -LN_S="$ac_cv_prog_LN_S"
- -if test "$ac_cv_prog_LN_S" = "ln -s"; then
- - echo "$ac_t""yes" 1>&6
- -else
- - echo "$ac_t""no" 1>&6
- -fi
- +echo "$as_me:$LINENO: result: $NM" >&5
- +echo "${ECHO_T}$NM" >&6
-
- -echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
- -echo "configure:1594: checking how to recognise dependant libraries" >&5
- -if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +echo "$as_me:$LINENO: checking whether ln -s works" >&5
- +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
- +LN_S=$as_ln_s
- +if test "$LN_S" = "ln -s"; then
- + echo "$as_me:$LINENO: result: yes" >&5
- +echo "${ECHO_T}yes" >&6
- +else
- + echo "$as_me:$LINENO: result: no, using $LN_S" >&5
- +echo "${ECHO_T}no, using $LN_S" >&6
- +fi
- +
- +echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5
- +echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
- +if test "${lt_cv_deplibs_check_method+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- lt_cv_file_magic_cmd='$MAGIC_CMD'
- lt_cv_file_magic_test_file=
- @@ -1757,67 +3394,13 @@
- esac
-
- fi
- -
- -echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
- +echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
- +echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
- file_magic_cmd=$lt_cv_file_magic_cmd
- deplibs_check_method=$lt_cv_deplibs_check_method
-
- -echo $ac_n "checking for object suffix""... $ac_c" 1>&6
- -echo "configure:1767: checking for object suffix" >&5
- -if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - rm -f conftest*
- -echo 'int i = 1;' > conftest.$ac_ext
- -if { (eval echo configure:1773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - for ac_file in conftest.*; do
- - case $ac_file in
- - *.c) ;;
- - *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
- - esac
- - done
- -else
- - { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
- -fi
- -rm -f conftest*
- -fi
- -
- -echo "$ac_t""$ac_cv_objext" 1>&6
- -OBJEXT=$ac_cv_objext
- -ac_objext=$ac_cv_objext
- -
- -
-
- -echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
- -echo "configure:1793: checking for executable suffix" >&5
- -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- - ac_cv_exeext=.exe
- -else
- - rm -f conftest*
- - echo 'int main () { return 0; }' > conftest.$ac_ext
- - ac_cv_exeext=
- - if { (eval echo configure:1803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- - for file in conftest.*; do
- - case $file in
- - *.c | *.o | *.obj | *.ilk | *.pdb) ;;
- - *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- - esac
- - done
- - else
- - { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- - fi
- - rm -f conftest*
- - test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
- -fi
- -fi
-
- -EXEEXT=""
- -test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
- -echo "$ac_t""${ac_cv_exeext}" 1>&6
- -ac_exeext=$EXEEXT
-
- # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-
- @@ -1825,10 +3408,10 @@
- case $deplibs_check_method in
- file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- - echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
- -echo "configure:1830: checking for ${ac_tool_prefix}file" >&5
- -if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- + echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
- +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
- +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- case $MAGIC_CMD in
- /*)
- @@ -1880,17 +3463,19 @@
-
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if test -n "$MAGIC_CMD"; then
- - echo "$ac_t""$MAGIC_CMD" 1>&6
- + echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
- +echo "${ECHO_T}$MAGIC_CMD" >&6
- else
- - echo "$ac_t""no" 1>&6
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
-
- if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- - echo $ac_n "checking for file""... $ac_c" 1>&6
- -echo "configure:1892: checking for file" >&5
- -if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- + echo "$as_me:$LINENO: checking for file" >&5
- +echo $ECHO_N "checking for file... $ECHO_C" >&6
- +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- case $MAGIC_CMD in
- /*)
- @@ -1942,9 +3527,11 @@
-
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if test -n "$MAGIC_CMD"; then
- - echo "$ac_t""$MAGIC_CMD" 1>&6
- + echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
- +echo "${ECHO_T}$MAGIC_CMD" >&6
- else
- - echo "$ac_t""no" 1>&6
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
-
- else
- @@ -1956,138 +3543,164 @@
- ;;
- esac
-
- -# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
- +if test -n "$ac_tool_prefix"; then
- + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
- set dummy ${ac_tool_prefix}ranlib; ac_word=$2
- -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- -echo "configure:1963: checking for $ac_word" >&5
- -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_RANLIB+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
- else
- - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- - ac_dummy="$PATH"
- - for ac_dir in $ac_dummy; do
- - test -z "$ac_dir" && ac_dir=.
- - if test -f $ac_dir/$ac_word; then
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- - break
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- fi
- - done
- - IFS="$ac_save_ifs"
- +done
- +done
- +
- fi
- fi
- -RANLIB="$ac_cv_prog_RANLIB"
- +RANLIB=$ac_cv_prog_RANLIB
- if test -n "$RANLIB"; then
- - echo "$ac_t""$RANLIB" 1>&6
- + echo "$as_me:$LINENO: result: $RANLIB" >&5
- +echo "${ECHO_T}$RANLIB" >&6
- else
- - echo "$ac_t""no" 1>&6
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
-
- -
- +fi
- if test -z "$ac_cv_prog_RANLIB"; then
- -if test -n "$ac_tool_prefix"; then
- + ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
- set dummy ranlib; ac_word=$2
- -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- -echo "configure:1995: checking for $ac_word" >&5
- -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - if test -n "$RANLIB"; then
- - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
- + if test -n "$ac_ct_RANLIB"; then
- + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
- else
- - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- - ac_dummy="$PATH"
- - for ac_dir in $ac_dummy; do
- - test -z "$ac_dir" && ac_dir=.
- - if test -f $ac_dir/$ac_word; then
- - ac_cv_prog_RANLIB="ranlib"
- - break
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_ac_ct_RANLIB="ranlib"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- fi
- - done
- - IFS="$ac_save_ifs"
- - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
- +done
- +done
- +
- + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
- fi
- fi
- -RANLIB="$ac_cv_prog_RANLIB"
- -if test -n "$RANLIB"; then
- - echo "$ac_t""$RANLIB" 1>&6
- +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
- +if test -n "$ac_ct_RANLIB"; then
- + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
- +echo "${ECHO_T}$ac_ct_RANLIB" >&6
- else
- - echo "$ac_t""no" 1>&6
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
-
- + RANLIB=$ac_ct_RANLIB
- else
- - RANLIB=":"
- -fi
- + RANLIB="$ac_cv_prog_RANLIB"
- fi
-
- -# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
- +if test -n "$ac_tool_prefix"; then
- + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
- set dummy ${ac_tool_prefix}strip; ac_word=$2
- -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- -echo "configure:2030: checking for $ac_word" >&5
- -if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_STRIP+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
- else
- - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- - ac_dummy="$PATH"
- - for ac_dir in $ac_dummy; do
- - test -z "$ac_dir" && ac_dir=.
- - if test -f $ac_dir/$ac_word; then
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- - break
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- fi
- - done
- - IFS="$ac_save_ifs"
- +done
- +done
- +
- fi
- fi
- -STRIP="$ac_cv_prog_STRIP"
- +STRIP=$ac_cv_prog_STRIP
- if test -n "$STRIP"; then
- - echo "$ac_t""$STRIP" 1>&6
- + echo "$as_me:$LINENO: result: $STRIP" >&5
- +echo "${ECHO_T}$STRIP" >&6
- else
- - echo "$ac_t""no" 1>&6
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
-
- -
- +fi
- if test -z "$ac_cv_prog_STRIP"; then
- -if test -n "$ac_tool_prefix"; then
- + ac_ct_STRIP=$STRIP
- # Extract the first word of "strip", so it can be a program name with args.
- set dummy strip; ac_word=$2
- -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- -echo "configure:2062: checking for $ac_word" >&5
- -if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - if test -n "$STRIP"; then
- - ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
- + if test -n "$ac_ct_STRIP"; then
- + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
- else
- - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- - ac_dummy="$PATH"
- - for ac_dir in $ac_dummy; do
- - test -z "$ac_dir" && ac_dir=.
- - if test -f $ac_dir/$ac_word; then
- - ac_cv_prog_STRIP="strip"
- - break
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_ac_ct_STRIP="strip"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- fi
- - done
- - IFS="$ac_save_ifs"
- - test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
- +done
- +done
- +
- + test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
- fi
- fi
- -STRIP="$ac_cv_prog_STRIP"
- -if test -n "$STRIP"; then
- - echo "$ac_t""$STRIP" 1>&6
- +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
- +if test -n "$ac_ct_STRIP"; then
- + echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
- +echo "${ECHO_T}$ac_ct_STRIP" >&6
- else
- - echo "$ac_t""no" 1>&6
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
-
- + STRIP=$ac_ct_STRIP
- else
- - STRIP=":"
- -fi
- + STRIP="$ac_cv_prog_STRIP"
- fi
-
-
- @@ -2103,9 +3716,8 @@
- # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
- if test "${enable_libtool_lock+set}" = set; then
- enableval="$enable_libtool_lock"
- - :
- -fi
-
- +fi;
- test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
- test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
- @@ -2115,8 +3727,7 @@
- pic_mode="$withval"
- else
- pic_mode=default
- -fi
- -
- +fi;
- test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
- test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
-
- @@ -2125,8 +3736,12 @@
- case $host in
- *-*-irix6*)
- # Find out which ABI we are using.
- - echo '#line 2129 "configure"' > conftest.$ac_ext
- - if { (eval echo configure:2130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- + echo '#line 3739 "configure"' > conftest.$ac_ext
- + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- @@ -2159,7 +3774,11 @@
- ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- - if { (eval echo configure:2163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; then
- case "`/usr/bin/file conftest.o`" in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- @@ -2176,47 +3795,64 @@
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- - echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
- -echo "configure:2181: checking whether the C compiler needs -belf" >&5
- -if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- + echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
- +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
- +if test "${lt_cv_cc_needs_belf+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-
- +
- ac_ext=c
- -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- ac_cpp='$CPP $CPPFLAGS'
- -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
- -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- -cross_compiling=$ac_cv_prog_cc_cross
- -
- - cat > conftest.$ac_ext <<EOF
- -#line 2194 "configure"
- -#include "confdefs.h"
- +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- +ac_compiler_gnu=$ac_cv_c_compiler_gnu
- +
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- -int main() {
- +int
- +main ()
- +{
-
- -; return 0; }
- -EOF
- -if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- lt_cv_cc_needs_belf=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - lt_cv_cc_needs_belf=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +lt_cv_cc_needs_belf=no
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- ac_ext=c
- -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- ac_cpp='$CPP $CPPFLAGS'
- -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
- -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- -cross_compiling=$ac_cv_prog_cc_cross
- +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- +ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- fi
- -
- -echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
- +echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
- +echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- @@ -2228,47 +3864,55 @@
-
-
- # Save cache, so that ltconfig can load it
- -cat > confcache <<\EOF
- +cat >confcache <<\_ACEOF
- # This file is a shell script that caches the results of configure
- # tests run on this system so they can be shared between configure
- -# scripts and configure runs. It is not useful on other systems.
- -# If it contains results you don't want to keep, you may remove or edit it.
- +# scripts and configure runs, see configure's option --config-cache.
- +# It is not useful on other systems. If it contains results you don't
- +# want to keep, you may remove or edit it.
- #
- -# By default, configure uses ./config.cache as the cache file,
- -# creating it if it does not exist already. You can give configure
- -# the --cache-file=FILE option to use a different cache file; that is
- -# what configure does when it calls configure scripts in
- -# subdirectories, so they share the cache.
- -# Giving --cache-file=/dev/null disables caching, for debugging configure.
- -# config.status only pays attention to the cache file if you give it the
- -# --recheck option to rerun configure.
- +# config.status only pays attention to the cache file if you give it
- +# the --recheck option to rerun configure.
- #
- -EOF
- +# `ac_cv_env_foo' variables (set or unset) will be overridden when
- +# loading this file, other *unset* `ac_cv_foo' will be assigned the
- +# following values.
- +
- +_ACEOF
- +
- # The following way of writing the cache mishandles newlines in values,
- # but we know of no workaround that is simple, portable, and efficient.
- # So, don't put newlines in cache variables' values.
- # Ultrix sh set writes to stderr and can't be redirected directly,
- # and sets the high bit in the cache file unless we assign to the vars.
- -(set) 2>&1 |
- +{
- + (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- - # `set' does not quote correctly, so add quotes (double-quote substitution
- - # turns \\\\ into \\, and sed turns \\ into \).
- + # `set' does not quote correctly, so add quotes (double-quote
- + # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- - -e "s/'/'\\\\''/g" \
- - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- + "s/'/'\\\\''/g;
- + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- - ;;
- - esac >> confcache
- -if cmp -s $cache_file confcache; then
- - :
- -else
- + sed -n \
- + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- + ;;
- + esac;
- +} |
- + sed '
- + t clear
- + : clear
- + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- + t end
- + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- + : end' >>confcache
- +if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- - echo "updating cache $cache_file"
- - cat confcache > $cache_file
- + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
- + cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
- @@ -2285,15 +3929,26 @@
- deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
- ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
- $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
- -|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
- +|| { { echo "$as_me:$LINENO: error: libtool configure failed" >&5
- +echo "$as_me: error: libtool configure failed" >&2;}
- + { (exit 1); exit 1; }; }
-
- # Reload cache, that may have been modified by ltconfig
- if test -r "$cache_file"; then
- - echo "loading cache $cache_file"
- - . $cache_file
- + # Some versions of bash will fail to source /dev/null (special
- + # files actually), so we avoid doing that.
- + if test -f "$cache_file"; then
- + { echo "$as_me:$LINENO: loading cache $cache_file" >&5
- +echo "$as_me: loading cache $cache_file" >&6;}
- + case $cache_file in
- + [\\/]* | ?:[\\/]* ) . $cache_file;;
- + *) . ./$cache_file;;
- + esac
- + fi
- else
- - echo "creating cache $cache_file"
- - > $cache_file
- + { echo "$as_me:$LINENO: creating cache $cache_file" >&5
- +echo "$as_me: creating cache $cache_file" >&6;}
- + >$cache_file
- fi
-
-
- @@ -2319,42 +3974,47 @@
- case "${enableval}" in
- yes) want64=true ;;
- no) want64=false ;;
- - *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
- + *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for 64-bit-bfd option" >&5
- +echo "$as_me: error: bad value ${enableval} for 64-bit-bfd option" >&2;}
- + { (exit 1); exit 1; }; } ;;
- esac
- else
- want64=false
- -fi
- -# Check whether --enable-targets or --disable-targets was given.
- +fi; # Check whether --enable-targets or --disable-targets was given.
- if test "${enable_targets+set}" = set; then
- enableval="$enable_targets"
- case "${enableval}" in
- - yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
- + yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5
- +echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
- + { (exit 1); exit 1; }; }
- ;;
- no) enable_targets= ;;
- *) enable_targets=$enableval ;;
- esac
- -fi
- -# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
- +fi; # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
- if test "${enable_commonbfdlib+set}" = set; then
- enableval="$enable_commonbfdlib"
- case "${enableval}" in
- yes) commonbfdlib=true ;;
- no) commonbfdlib=false ;;
- - *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
- + *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for BFD commonbfdlib option" >&5
- +echo "$as_me: error: bad value ${enableval} for BFD commonbfdlib option" >&2;}
- + { (exit 1); exit 1; }; } ;;
- esac
- -fi
- +fi;
- # Check whether --with-mmap or --without-mmap was given.
- if test "${with_mmap+set}" = set; then
- withval="$with_mmap"
- case "${withval}" in
- yes) want_mmap=true ;;
- no) want_mmap=false ;;
- - *) { echo "configure: error: bad value ${withval} for BFD with-mmap option" 1>&2; exit 1; } ;;
- + *) { { echo "$as_me:$LINENO: error: bad value ${withval} for BFD with-mmap option" >&5
- +echo "$as_me: error: bad value ${withval} for BFD with-mmap option" >&2;}
- + { (exit 1); exit 1; }; } ;;
- esac
- else
- want_mmap=false
- -fi
- -
- +fi;
- build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
- # Check whether --enable-build-warnings or --disable-build-warnings was given.
- if test "${enable_build_warnings+set}" = set; then
- @@ -2371,32 +4031,36 @@
- if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
- fi
- -fi
- -WARN_CFLAGS=""
- +fi; WARN_CFLAGS=""
- if test "x${build_warnings}" != x && test "x$GCC" = xyes ; then
- WARN_CFLAGS="${build_warnings}"
- fi
-
-
- +# Add the stamp file to the list of files AC keeps track of,
- +# along with our hook.
- + ac_config_headers="$ac_config_headers config.h:config.in"
-
-
-
-
- if test -z "$target" ; then
- - { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
- + { { echo "$as_me:$LINENO: error: Unrecognized target system type; please check config.sub." >&5
- +echo "$as_me: error: Unrecognized target system type; please check config.sub." >&2;}
- + { (exit 1); exit 1; }; }
- fi
-
- -echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
- -echo "configure:2391: checking whether to enable maintainer-specific portions of Makefiles" >&5
- +echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
- +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
- if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
- else
- USE_MAINTAINER_MODE=no
- -fi
- -
- - echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
- +fi;
- + echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
- +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
-
-
- if test $USE_MAINTAINER_MODE = yes; then
- @@ -2409,8 +4073,8 @@
- MAINT=$MAINTAINER_MODE_TRUE
-
-
- -echo $ac_n "checking whether to install libbfd""... $ac_c" 1>&6
- -echo "configure:2414: checking whether to install libbfd" >&5
- +echo "$as_me:$LINENO: checking whether to install libbfd" >&5
- +echo $ECHO_N "checking whether to install libbfd... $ECHO_C" >&6
- # Check whether --enable-install-libbfd or --disable-install-libbfd was given.
- if test "${enable_install_libbfd+set}" = set; then
- enableval="$enable_install_libbfd"
- @@ -2421,9 +4085,9 @@
- else
- install_libbfd_p=no
- fi
- -fi
- -
- - echo "$ac_t""$install_libbfd_p" 1>&6
- +fi;
- + echo "$as_me:$LINENO: result: $install_libbfd_p" >&5
- +echo "${ECHO_T}$install_libbfd_p" >&6
-
-
- if test $install_libbfd_p = yes; then
- @@ -2446,252 +4110,446 @@
-
-
-
- -echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
- -echo "configure:2451: checking for executable suffix" >&5
- -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +host64=false
- +target64=false
- +bfd_default_target_size=32
- +
- +# host stuff:
- +
- +ac_ext=c
- +ac_cpp='$CPP $CPPFLAGS'
- +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- +ac_compiler_gnu=$ac_cv_c_compiler_gnu
- +if test -n "$ac_tool_prefix"; then
- + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
- +set dummy ${ac_tool_prefix}gcc; ac_word=$2
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_CC+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- - ac_cv_exeext=.exe
- + if test -n "$CC"; then
- + ac_cv_prog_CC="$CC" # Let the user override the test.
- else
- - rm -f conftest*
- - echo 'int main () { return 0; }' > conftest.$ac_ext
- - ac_cv_exeext=
- - if { (eval echo configure:2461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- - for file in conftest.*; do
- - case $file in
- - *.c | *.o | *.obj | *.ilk | *.pdb) ;;
- - *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- - esac
- - done
- - else
- - { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_CC="${ac_tool_prefix}gcc"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- fi
- - rm -f conftest*
- - test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
- +done
- +done
- +
- fi
- fi
- +CC=$ac_cv_prog_CC
- +if test -n "$CC"; then
- + echo "$as_me:$LINENO: result: $CC" >&5
- +echo "${ECHO_T}$CC" >&6
- +else
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- +fi
-
- -EXEEXT=""
- -test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
- -echo "$ac_t""${ac_cv_exeext}" 1>&6
- -ac_exeext=$EXEEXT
- -
- +fi
- +if test -z "$ac_cv_prog_CC"; then
- + ac_ct_CC=$CC
- + # Extract the first word of "gcc", so it can be a program name with args.
- +set dummy gcc; ac_word=$2
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + if test -n "$ac_ct_CC"; then
- + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
- +else
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_ac_ct_CC="gcc"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- + fi
- +done
- +done
-
- -host64=false
- -target64=false
- -bfd_default_target_size=32
- +fi
- +fi
- +ac_ct_CC=$ac_cv_prog_ac_ct_CC
- +if test -n "$ac_ct_CC"; then
- + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
- +echo "${ECHO_T}$ac_ct_CC" >&6
- +else
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- +fi
-
- -# host stuff:
- + CC=$ac_ct_CC
- +else
- + CC="$ac_cv_prog_CC"
- +fi
-
- -# Extract the first word of "gcc", so it can be a program name with args.
- -set dummy gcc; ac_word=$2
- -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- -echo "configure:2491: checking for $ac_word" >&5
- -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +if test -z "$CC"; then
- + if test -n "$ac_tool_prefix"; then
- + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
- +set dummy ${ac_tool_prefix}cc; ac_word=$2
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_CC+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
- else
- - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- - ac_dummy="$PATH"
- - for ac_dir in $ac_dummy; do
- - test -z "$ac_dir" && ac_dir=.
- - if test -f $ac_dir/$ac_word; then
- - ac_cv_prog_CC="gcc"
- - break
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_CC="${ac_tool_prefix}cc"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- fi
- - done
- - IFS="$ac_save_ifs"
- +done
- +done
- +
- fi
- fi
- -CC="$ac_cv_prog_CC"
- +CC=$ac_cv_prog_CC
- if test -n "$CC"; then
- - echo "$ac_t""$CC" 1>&6
- + echo "$as_me:$LINENO: result: $CC" >&5
- +echo "${ECHO_T}$CC" >&6
- +else
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- +fi
- +
- +fi
- +if test -z "$ac_cv_prog_CC"; then
- + ac_ct_CC=$CC
- + # Extract the first word of "cc", so it can be a program name with args.
- +set dummy cc; ac_word=$2
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + if test -n "$ac_ct_CC"; then
- + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
- +else
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_ac_ct_CC="cc"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- + fi
- +done
- +done
- +
- +fi
- +fi
- +ac_ct_CC=$ac_cv_prog_ac_ct_CC
- +if test -n "$ac_ct_CC"; then
- + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
- +echo "${ECHO_T}$ac_ct_CC" >&6
- else
- - echo "$ac_t""no" 1>&6
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
-
- + CC=$ac_ct_CC
- +else
- + CC="$ac_cv_prog_CC"
- +fi
- +
- +fi
- if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
- set dummy cc; ac_word=$2
- -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- -echo "configure:2521: checking for $ac_word" >&5
- -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_CC+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
- else
- - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- - ac_dummy="$PATH"
- - for ac_dir in $ac_dummy; do
- - test -z "$ac_dir" && ac_dir=.
- - if test -f $ac_dir/$ac_word; then
- - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- - break
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- fi
- - done
- - IFS="$ac_save_ifs"
- +done
- +done
- +
- if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- - if test $# -gt 0; then
- + if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- - set dummy "$ac_dir/$ac_word" "$@"
- - shift
- - ac_cv_prog_CC="$@"
- + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- fi
- fi
- fi
- fi
- -CC="$ac_cv_prog_CC"
- +CC=$ac_cv_prog_CC
- if test -n "$CC"; then
- - echo "$ac_t""$CC" 1>&6
- + echo "$as_me:$LINENO: result: $CC" >&5
- +echo "${ECHO_T}$CC" >&6
- else
- - echo "$ac_t""no" 1>&6
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
-
- - if test -z "$CC"; then
- - case "`uname -s`" in
- - *win32* | *WIN32*)
- - # Extract the first word of "cl", so it can be a program name with args.
- -set dummy cl; ac_word=$2
- -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- -echo "configure:2572: checking for $ac_word" >&5
- -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +fi
- +if test -z "$CC"; then
- + if test -n "$ac_tool_prefix"; then
- + for ac_prog in cl
- + do
- + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
- +set dummy $ac_tool_prefix$ac_prog; ac_word=$2
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_CC+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
- else
- - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- - ac_dummy="$PATH"
- - for ac_dir in $ac_dummy; do
- - test -z "$ac_dir" && ac_dir=.
- - if test -f $ac_dir/$ac_word; then
- - ac_cv_prog_CC="cl"
- - break
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- fi
- - done
- - IFS="$ac_save_ifs"
- +done
- +done
- +
- fi
- fi
- -CC="$ac_cv_prog_CC"
- +CC=$ac_cv_prog_CC
- if test -n "$CC"; then
- - echo "$ac_t""$CC" 1>&6
- + echo "$as_me:$LINENO: result: $CC" >&5
- +echo "${ECHO_T}$CC" >&6
- else
- - echo "$ac_t""no" 1>&6
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
- - ;;
- - esac
- +
- + test -n "$CC" && break
- + done
- +fi
- +if test -z "$CC"; then
- + ac_ct_CC=$CC
- + for ac_prog in cl
- +do
- + # Extract the first word of "$ac_prog", so it can be a program name with args.
- +set dummy $ac_prog; ac_word=$2
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + if test -n "$ac_ct_CC"; then
- + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
- +else
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_ac_ct_CC="$ac_prog"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- fi
- - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
- +done
- +done
- +
- +fi
- +fi
- +ac_ct_CC=$ac_cv_prog_ac_ct_CC
- +if test -n "$ac_ct_CC"; then
- + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
- +echo "${ECHO_T}$ac_ct_CC" >&6
- +else
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
-
- -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
- -echo "configure:2604: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
- + test -n "$ac_ct_CC" && break
- +done
-
- -ac_ext=c
- -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- -ac_cpp='$CPP $CPPFLAGS'
- -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
- -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- -cross_compiling=$ac_cv_prog_cc_cross
- + CC=$ac_ct_CC
- +fi
-
- -cat > conftest.$ac_ext << EOF
- +fi
-
- -#line 2615 "configure"
- -#include "confdefs.h"
-
- -main(){return(0);}
- -EOF
- -if { (eval echo configure:2620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- - ac_cv_prog_cc_works=yes
- - # If we can't run a trivial program, we are probably using a cross compiler.
- - if (./conftest; exit) 2>/dev/null; then
- - ac_cv_prog_cc_cross=no
- - else
- - ac_cv_prog_cc_cross=yes
- - fi
- -else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - ac_cv_prog_cc_works=no
- -fi
- -rm -fr conftest*
- -ac_ext=c
- -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- -ac_cpp='$CPP $CPPFLAGS'
- -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
- -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- -cross_compiling=$ac_cv_prog_cc_cross
- -
- -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
- -if test $ac_cv_prog_cc_works = no; then
- - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
- -fi
- -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
- -echo "configure:2646: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
- -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
- -cross_compiling=$ac_cv_prog_cc_cross
- -
- -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
- -echo "configure:2651: checking whether we are using GNU C" >&5
- -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.c <<EOF
- -#ifdef __GNUC__
- - yes;
- +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
- +See \`config.log' for more details." >&5
- +echo "$as_me: error: no acceptable C compiler found in \$PATH
- +See \`config.log' for more details." >&2;}
- + { (exit 1); exit 1; }; }
- +
- +# Provide some information about the compiler.
- +echo "$as_me:$LINENO:" \
- + "checking for C compiler version" >&5
- +ac_compiler=`set X $ac_compile; echo $2`
- +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- + (eval $ac_compiler --version </dev/null >&5) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }
- +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- + (eval $ac_compiler -v </dev/null >&5) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }
- +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- + (eval $ac_compiler -V </dev/null >&5) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }
- +
- +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
- +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
- +if test "${ac_cv_c_compiler_gnu+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +
- +int
- +main ()
- +{
- +#ifndef __GNUC__
- + choke me
- #endif
- -EOF
- -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- - ac_cv_prog_gcc=yes
- -else
- - ac_cv_prog_gcc=no
- -fi
- -fi
-
- -echo "$ac_t""$ac_cv_prog_gcc" 1>&6
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + ac_compiler_gnu=yes
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +ac_compiler_gnu=no
- +fi
- +rm -f conftest.$ac_objext conftest.$ac_ext
- +ac_cv_c_compiler_gnu=$ac_compiler_gnu
- +
- +fi
- +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
- +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
- +GCC=`test $ac_compiler_gnu = yes && echo yes`
- +ac_test_CFLAGS=${CFLAGS+set}
- +ac_save_CFLAGS=$CFLAGS
- +CFLAGS="-g"
- +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
- +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
- +if test "${ac_cv_prog_cc_g+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- -if test $ac_cv_prog_gcc = yes; then
- - GCC=yes
- -else
- - GCC=
- -fi
- +int
- +main ()
- +{
-
- -ac_test_CFLAGS="${CFLAGS+set}"
- -ac_save_CFLAGS="$CFLAGS"
- -CFLAGS=
- -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
- -echo "configure:2679: checking whether ${CC-cc} accepts -g" >&5
- -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - echo 'void f(){}' > conftest.c
- -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- ac_cv_prog_cc_g=yes
- else
- - ac_cv_prog_cc_g=no
- -fi
- -rm -f conftest*
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
-
- +ac_cv_prog_cc_g=no
- fi
- -
- -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- +rm -f conftest.$ac_objext conftest.$ac_ext
- +fi
- +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
- +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
- if test "$ac_test_CFLAGS" = set; then
- - CFLAGS="$ac_save_CFLAGS"
- + CFLAGS=$ac_save_CFLAGS
- elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- @@ -2705,159 +4563,618 @@
- CFLAGS=
- fi
- fi
- +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
- +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
- +if test "${ac_cv_prog_cc_stdc+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + ac_cv_prog_cc_stdc=no
- +ac_save_CC=$CC
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +#include <stdarg.h>
- +#include <stdio.h>
- +#include <sys/types.h>
- +#include <sys/stat.h>
- +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
- +struct buf { int x; };
- +FILE * (*rcsopen) (struct buf *, struct stat *, int);
- +static char *e (p, i)
- + char **p;
- + int i;
- +{
- + return p[i];
- +}
- +static char *f (char * (*g) (char **, int), char **p, ...)
- +{
- + char *s;
- + va_list v;
- + va_start (v,p);
- + s = g (p, va_arg (v,int));
- + va_end (v);
- + return s;
- +}
- +int test (int i, double x);
- +struct s1 {int (*f) (int a);};
- +struct s2 {int (*f) (double a);};
- +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
- +int argc;
- +char **argv;
- +int
- +main ()
- +{
- +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- + ;
- + return 0;
- +}
- +_ACEOF
- +# Don't try gcc -ansi; that turns off useful extensions and
- +# breaks some systems' header files.
- +# AIX -qlanglvl=ansi
- +# Ultrix and OSF/1 -std1
- +# HP-UX 10.20 and later -Ae
- +# HP-UX older versions -Aa -D_HPUX_SOURCE
- +# SVR4 -Xc -D__EXTENSIONS__
- +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
- +do
- + CC="$ac_save_CC $ac_arg"
- + rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + ac_cv_prog_cc_stdc=$ac_arg
- +break
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +fi
- +rm -f conftest.$ac_objext
- +done
- +rm -f conftest.$ac_ext conftest.$ac_objext
- +CC=$ac_save_CC
- +
- +fi
- +
- +case "x$ac_cv_prog_cc_stdc" in
- + x|xno)
- + echo "$as_me:$LINENO: result: none needed" >&5
- +echo "${ECHO_T}none needed" >&6 ;;
- + *)
- + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
- +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- + CC="$CC $ac_cv_prog_cc_stdc" ;;
- +esac
- +
- +# Some people use a C++ compiler to compile C. Since we use `exit',
- +# in C++ we need to declare it. In case someone uses the same compiler
- +# for both compiling C and C++ we need to have the C++ compiler decide
- +# the declaration of exit, since it's the most demanding environment.
- +cat >conftest.$ac_ext <<_ACEOF
- +#ifndef __cplusplus
- + choke me
- +#endif
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + for ac_declaration in \
- + ''\
- + '#include <stdlib.h>' \
- + 'extern "C" void std::exit (int) throw (); using std::exit;' \
- + 'extern "C" void std::exit (int); using std::exit;' \
- + 'extern "C" void exit (int) throw ();' \
- + 'extern "C" void exit (int);' \
- + 'void exit (int);'
- +do
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +#include <stdlib.h>
- +$ac_declaration
- +int
- +main ()
- +{
- +exit (42);
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + :
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +continue
- +fi
- +rm -f conftest.$ac_objext conftest.$ac_ext
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +$ac_declaration
- +int
- +main ()
- +{
- +exit (42);
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + break
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +fi
- +rm -f conftest.$ac_objext conftest.$ac_ext
- +done
- +rm -f conftest*
- +if test -n "$ac_declaration"; then
- + echo '#ifdef __cplusplus' >>confdefs.h
- + echo $ac_declaration >>confdefs.h
- + echo '#endif' >>confdefs.h
- +fi
- +
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +fi
- +rm -f conftest.$ac_objext conftest.$ac_ext
- +ac_ext=c
- +ac_cpp='$CPP $CPPFLAGS'
- +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- +ac_compiler_gnu=$ac_cv_c_compiler_gnu
- +
- +
- +ALL_LINGUAS="fr tr ja es sv da zh_CN"
- +if test -n "$ac_tool_prefix"; then
- + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
- +set dummy ${ac_tool_prefix}ranlib; ac_word=$2
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_RANLIB+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + if test -n "$RANLIB"; then
- + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
- +else
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- + fi
- +done
- +done
- +
- +fi
- +fi
- +RANLIB=$ac_cv_prog_RANLIB
- +if test -n "$RANLIB"; then
- + echo "$as_me:$LINENO: result: $RANLIB" >&5
- +echo "${ECHO_T}$RANLIB" >&6
- +else
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- +fi
- +
- +fi
- +if test -z "$ac_cv_prog_RANLIB"; then
- + ac_ct_RANLIB=$RANLIB
- + # Extract the first word of "ranlib", so it can be a program name with args.
- +set dummy ranlib; ac_word=$2
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + if test -n "$ac_ct_RANLIB"; then
- + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
- +else
- +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_prog_ac_ct_RANLIB="ranlib"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- + fi
- +done
- +done
- +
- + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
- +fi
- +fi
- +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
- +if test -n "$ac_ct_RANLIB"; then
- + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
- +echo "${ECHO_T}$ac_ct_RANLIB" >&6
- +else
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- +fi
-
- + RANLIB=$ac_ct_RANLIB
- +else
- + RANLIB="$ac_cv_prog_RANLIB"
- +fi
-
- -ALL_LINGUAS="fr tr ja es sv da zh_CN"
- -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
- -echo "configure:2713: checking how to run the C preprocessor" >&5
- +ac_ext=c
- +ac_cpp='$CPP $CPPFLAGS'
- +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- +ac_compiler_gnu=$ac_cv_c_compiler_gnu
- +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
- +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
- # On Suns, sometimes $CPP names a directory.
- if test -n "$CPP" && test -d "$CPP"; then
- CPP=
- fi
- if test -z "$CPP"; then
- -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- + if test "${ac_cv_prog_CPP+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - # This must be in double quotes, not single quotes, because CPP may get
- - # substituted into the Makefile and "${CC-cc}" will confuse make.
- - CPP="${CC-cc} -E"
- + # Double quotes because CPP needs to be expanded
- + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- + do
- + ac_preproc_ok=false
- +for ac_c_preproc_warn_flag in '' yes
- +do
- + # Use a header file that comes with gcc, so configuring glibc
- + # with a fresh cross-compiler works.
- + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- + # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- - # not just through cpp.
- - cat > conftest.$ac_ext <<EOF
- -#line 2728 "configure"
- -#include "confdefs.h"
- -#include <assert.h>
- -Syntax Error
- -EOF
- -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- -{ (eval echo configure:2734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- -if test -z "$ac_err"; then
- - :
- -else
- - echo "$ac_err" >&5
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - CPP="${CC-cc} -E -traditional-cpp"
- - cat > conftest.$ac_ext <<EOF
- -#line 2745 "configure"
- -#include "confdefs.h"
- -#include <assert.h>
- -Syntax Error
- -EOF
- -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- -{ (eval echo configure:2751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- -if test -z "$ac_err"; then
- - :
- + # not just through cpp. "Syntax error" is here to catch this case.
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +#ifdef __STDC__
- +# include <limits.h>
- +#else
- +# include <assert.h>
- +#endif
- + Syntax error
- +_ACEOF
- +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- + ac_status=$?
- + grep -v '^ *+' conftest.er1 >conftest.err
- + rm -f conftest.er1
- + cat conftest.err >&5
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } >/dev/null; then
- + if test -s conftest.err; then
- + ac_cpp_err=$ac_c_preproc_warn_flag
- + else
- + ac_cpp_err=
- + fi
- else
- - echo "$ac_err" >&5
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - CPP="${CC-cc} -nologo -E"
- - cat > conftest.$ac_ext <<EOF
- -#line 2762 "configure"
- -#include "confdefs.h"
- -#include <assert.h>
- -Syntax Error
- -EOF
- -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- -{ (eval echo configure:2768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- -if test -z "$ac_err"; then
- + ac_cpp_err=yes
- +fi
- +if test -z "$ac_cpp_err"; then
- :
- else
- - echo "$ac_err" >&5
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - CPP=/lib/cpp
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- + # Broken: fails on valid input.
- +continue
- fi
- -rm -f conftest*
- +rm -f conftest.err conftest.$ac_ext
- +
- + # OK, works on sane cases. Now check whether non-existent headers
- + # can be detected and how.
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +#include <ac_nonexistent.h>
- +_ACEOF
- +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- + ac_status=$?
- + grep -v '^ *+' conftest.er1 >conftest.err
- + rm -f conftest.er1
- + cat conftest.err >&5
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } >/dev/null; then
- + if test -s conftest.err; then
- + ac_cpp_err=$ac_c_preproc_warn_flag
- + else
- + ac_cpp_err=
- + fi
- +else
- + ac_cpp_err=yes
- +fi
- +if test -z "$ac_cpp_err"; then
- + # Broken: success on invalid input.
- +continue
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- + # Passes both tests.
- +ac_preproc_ok=:
- +break
- fi
- -rm -f conftest*
- +rm -f conftest.err conftest.$ac_ext
- +
- +done
- +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
- +rm -f conftest.err conftest.$ac_ext
- +if $ac_preproc_ok; then
- + break
- fi
- -rm -f conftest*
- - ac_cv_prog_CPP="$CPP"
- +
- + done
- + ac_cv_prog_CPP=$CPP
- +
- fi
- - CPP="$ac_cv_prog_CPP"
- + CPP=$ac_cv_prog_CPP
- else
- - ac_cv_prog_CPP="$CPP"
- + ac_cv_prog_CPP=$CPP
- fi
- -echo "$ac_t""$CPP" 1>&6
- -
- -# Extract the first word of "ranlib", so it can be a program name with args.
- -set dummy ranlib; ac_word=$2
- -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- -echo "configure:2795: checking for $ac_word" >&5
- -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +echo "$as_me:$LINENO: result: $CPP" >&5
- +echo "${ECHO_T}$CPP" >&6
- +ac_preproc_ok=false
- +for ac_c_preproc_warn_flag in '' yes
- +do
- + # Use a header file that comes with gcc, so configuring glibc
- + # with a fresh cross-compiler works.
- + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- + # <limits.h> exists even on freestanding compilers.
- + # On the NeXT, cc -E runs the code through the compiler's parser,
- + # not just through cpp. "Syntax error" is here to catch this case.
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +#ifdef __STDC__
- +# include <limits.h>
- +#else
- +# include <assert.h>
- +#endif
- + Syntax error
- +_ACEOF
- +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- + ac_status=$?
- + grep -v '^ *+' conftest.er1 >conftest.err
- + rm -f conftest.er1
- + cat conftest.err >&5
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } >/dev/null; then
- + if test -s conftest.err; then
- + ac_cpp_err=$ac_c_preproc_warn_flag
- + else
- + ac_cpp_err=
- + fi
- else
- - if test -n "$RANLIB"; then
- - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
- + ac_cpp_err=yes
- +fi
- +if test -z "$ac_cpp_err"; then
- + :
- else
- - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- - ac_dummy="$PATH"
- - for ac_dir in $ac_dummy; do
- - test -z "$ac_dir" && ac_dir=.
- - if test -f $ac_dir/$ac_word; then
- - ac_cv_prog_RANLIB="ranlib"
- - break
- - fi
- - done
- - IFS="$ac_save_ifs"
- - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- + # Broken: fails on valid input.
- +continue
- fi
- +rm -f conftest.err conftest.$ac_ext
- +
- + # OK, works on sane cases. Now check whether non-existent headers
- + # can be detected and how.
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +#include <ac_nonexistent.h>
- +_ACEOF
- +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- + ac_status=$?
- + grep -v '^ *+' conftest.er1 >conftest.err
- + rm -f conftest.er1
- + cat conftest.err >&5
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } >/dev/null; then
- + if test -s conftest.err; then
- + ac_cpp_err=$ac_c_preproc_warn_flag
- + else
- + ac_cpp_err=
- + fi
- +else
- + ac_cpp_err=yes
- +fi
- +if test -z "$ac_cpp_err"; then
- + # Broken: success on invalid input.
- +continue
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- + # Passes both tests.
- +ac_preproc_ok=:
- +break
- fi
- -RANLIB="$ac_cv_prog_RANLIB"
- -if test -n "$RANLIB"; then
- - echo "$ac_t""$RANLIB" 1>&6
- +rm -f conftest.err conftest.$ac_ext
- +
- +done
- +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
- +rm -f conftest.err conftest.$ac_ext
- +if $ac_preproc_ok; then
- + :
- else
- - echo "$ac_t""no" 1>&6
- + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
- +See \`config.log' for more details." >&5
- +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
- +See \`config.log' for more details." >&2;}
- + { (exit 1); exit 1; }; }
- fi
-
- -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
- -echo "configure:2823: checking for ANSI C header files" >&5
- -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 2828 "configure"
- -#include "confdefs.h"
- +ac_ext=c
- +ac_cpp='$CPP $CPPFLAGS'
- +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- +ac_compiler_gnu=$ac_cv_c_compiler_gnu
- +
- +
- +echo "$as_me:$LINENO: checking for egrep" >&5
- +echo $ECHO_N "checking for egrep... $ECHO_C" >&6
- +if test "${ac_cv_prog_egrep+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- + then ac_cv_prog_egrep='grep -E'
- + else ac_cv_prog_egrep='egrep'
- + fi
- +fi
- +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
- +echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- + EGREP=$ac_cv_prog_egrep
- +
- +
- +echo "$as_me:$LINENO: checking for ANSI C header files" >&5
- +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
- +if test "${ac_cv_header_stdc+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- #include <stdlib.h>
- #include <stdarg.h>
- #include <string.h>
- #include <float.h>
- -EOF
- -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- -{ (eval echo configure:2836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- -if test -z "$ac_err"; then
- - rm -rf conftest*
- +
- +int
- +main ()
- +{
- +
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- ac_cv_header_stdc=yes
- else
- - echo "$ac_err" >&5
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - ac_cv_header_stdc=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +ac_cv_header_stdc=no
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
-
- if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- -cat > conftest.$ac_ext <<EOF
- -#line 2853 "configure"
- -#include "confdefs.h"
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- #include <string.h>
- -EOF
- +
- +_ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- - egrep "memchr" >/dev/null 2>&1; then
- + $EGREP "memchr" >/dev/null 2>&1; then
- :
- else
- - rm -rf conftest*
- ac_cv_header_stdc=no
- fi
- rm -f conftest*
- @@ -2866,16 +5183,20 @@
-
- if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- -cat > conftest.$ac_ext <<EOF
- -#line 2871 "configure"
- -#include "confdefs.h"
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- #include <stdlib.h>
- -EOF
- +
- +_ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- - egrep "free" >/dev/null 2>&1; then
- + $EGREP "free" >/dev/null 2>&1; then
- :
- else
- - rm -rf conftest*
- ac_cv_header_stdc=no
- fi
- rm -f conftest*
- @@ -2884,269 +5205,473 @@
-
- if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- -if test "$cross_compiling" = yes; then
- + if test "$cross_compiling" = yes; then
- :
- else
- - cat > conftest.$ac_ext <<EOF
- -#line 2892 "configure"
- -#include "confdefs.h"
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- #include <ctype.h>
- -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
- -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
- -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
- -int main () { int i; for (i = 0; i < 256; i++)
- -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
- -exit (0); }
- +#if ((' ' & 0x0FF) == 0x020)
- +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
- +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
- +#else
- +# define ISLOWER(c) \
- + (('a' <= (c) && (c) <= 'i') \
- + || ('j' <= (c) && (c) <= 'r') \
- + || ('s' <= (c) && (c) <= 'z'))
- +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
- +#endif
-
- -EOF
- -if { (eval echo configure:2903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- -then
- +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
- +int
- +main ()
- +{
- + int i;
- + for (i = 0; i < 256; i++)
- + if (XOR (islower (i), ISLOWER (i))
- + || toupper (i) != TOUPPER (i))
- + exit(2);
- + exit (0);
- +}
- +_ACEOF
- +rm -f conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- :
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -fr conftest*
- - ac_cv_header_stdc=no
- + echo "$as_me: program exited with status $ac_status" >&5
- +echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +( exit $ac_status )
- +ac_cv_header_stdc=no
- fi
- -rm -fr conftest*
- +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
- -
- fi
- fi
- -
- -echo "$ac_t""$ac_cv_header_stdc" 1>&6
- +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
- +echo "${ECHO_T}$ac_cv_header_stdc" >&6
- if test $ac_cv_header_stdc = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define STDC_HEADERS 1
- -EOF
- +_ACEOF
-
- fi
-
- -echo $ac_n "checking for working const""... $ac_c" 1>&6
- -echo "configure:2927: checking for working const" >&5
- -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 2932 "configure"
- -#include "confdefs.h"
- -
- -int main() {
- -
- -/* Ultrix mips cc rejects this. */
- -typedef int charset[2]; const charset x;
- -/* SunOS 4.1.1 cc rejects this. */
- -char const *const *ccp;
- -char **p;
- -/* NEC SVR4.0.2 mips cc rejects this. */
- -struct point {int x, y;};
- -static struct point const zero = {0,0};
- -/* AIX XL C 1.02.0.0 rejects this.
- - It does not let you subtract one const X* pointer from another in an arm
- - of an if-expression whose if-part is not a constant expression */
- -const char *g = "string";
- -ccp = &g + (g ? g-g : 0);
- -/* HPUX 7.0 cc rejects these. */
- -++ccp;
- -p = (char**) ccp;
- -ccp = (char const *const *) p;
- -{ /* SCO 3.2v4 cc rejects this. */
- +echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
- +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
- +if test "${ac_cv_c_const+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +
- +int
- +main ()
- +{
- +/* FIXME: Include the comments suggested by Paul. */
- +#ifndef __cplusplus
- + /* Ultrix mips cc rejects this. */
- + typedef int charset[2];
- + const charset x;
- + /* SunOS 4.1.1 cc rejects this. */
- + char const *const *ccp;
- + char **p;
- + /* NEC SVR4.0.2 mips cc rejects this. */
- + struct point {int x, y;};
- + static struct point const zero = {0,0};
- + /* AIX XL C 1.02.0.0 rejects this.
- + It does not let you subtract one const X* pointer from another in
- + an arm of an if-expression whose if-part is not a constant
- + expression */
- + const char *g = "string";
- + ccp = &g + (g ? g-g : 0);
- + /* HPUX 7.0 cc rejects these. */
- + ++ccp;
- + p = (char**) ccp;
- + ccp = (char const *const *) p;
- + { /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
- -}
- -{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- + }
- + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
- -}
- -{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- + }
- + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
- -}
- -{ /* AIX XL C 1.02.0.0 rejects this saying
- + }
- + { /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
- -}
- -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- + }
- + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
- -}
- + }
- +#endif
-
- -; return 0; }
- -EOF
- -if { (eval echo configure:2981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- ac_cv_c_const=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - ac_cv_c_const=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +ac_cv_c_const=no
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
- -
- -echo "$ac_t""$ac_cv_c_const" 1>&6
- +echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
- +echo "${ECHO_T}$ac_cv_c_const" >&6
- if test $ac_cv_c_const = no; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define const
- -EOF
- +_ACEOF
-
- fi
-
- -echo $ac_n "checking for inline""... $ac_c" 1>&6
- -echo "configure:3002: checking for inline" >&5
- -if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +echo "$as_me:$LINENO: checking for inline" >&5
- +echo $ECHO_N "checking for inline... $ECHO_C" >&6
- +if test "${ac_cv_c_inline+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- ac_cv_c_inline=no
- for ac_kw in inline __inline__ __inline; do
- - cat > conftest.$ac_ext <<EOF
- -#line 3009 "configure"
- -#include "confdefs.h"
- -
- -int main() {
- -} $ac_kw foo() {
- -; return 0; }
- -EOF
- -if { (eval echo configure:3016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +#ifndef __cplusplus
- +typedef int foo_t;
- +static $ac_kw foo_t static_foo () {return 0; }
- +$ac_kw foo_t foo () {return 0; }
- +#endif
- +
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- ac_cv_c_inline=$ac_kw; break
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- done
-
- fi
- -
- -echo "$ac_t""$ac_cv_c_inline" 1>&6
- -case "$ac_cv_c_inline" in
- +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
- +echo "${ECHO_T}$ac_cv_c_inline" >&6
- +case $ac_cv_c_inline in
- inline | yes) ;;
- - no) cat >> confdefs.h <<\EOF
- + no)
- +cat >>confdefs.h <<\_ACEOF
- #define inline
- -EOF
- +_ACEOF
- ;;
- - *) cat >> confdefs.h <<EOF
- + *) cat >>confdefs.h <<_ACEOF
- #define inline $ac_cv_c_inline
- -EOF
- +_ACEOF
- ;;
- esac
-
- -echo $ac_n "checking for off_t""... $ac_c" 1>&6
- -echo "configure:3042: checking for off_t" >&5
- -if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 3047 "configure"
- -#include "confdefs.h"
- -#include <sys/types.h>
- -#if STDC_HEADERS
- -#include <stdlib.h>
- -#include <stddef.h>
- -#endif
- -EOF
- -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- - egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- - rm -rf conftest*
- +# On IRIX 5.3, sys/types and inttypes.h are conflicting.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- + inttypes.h stdint.h unistd.h
- +do
- +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
- +echo "$as_me:$LINENO: checking for $ac_header" >&5
- +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
- +if eval "test \"\${$as_ac_Header+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +$ac_includes_default
- +
- +#include <$ac_header>
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + eval "$as_ac_Header=yes"
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +eval "$as_ac_Header=no"
- +fi
- +rm -f conftest.$ac_objext conftest.$ac_ext
- +fi
- +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- +if test `eval echo '${'$as_ac_Header'}'` = yes; then
- + cat >>confdefs.h <<_ACEOF
- +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
- +_ACEOF
- +
- +fi
- +
- +done
- +
- +
- +echo "$as_me:$LINENO: checking for off_t" >&5
- +echo $ECHO_N "checking for off_t... $ECHO_C" >&6
- +if test "${ac_cv_type_off_t+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +$ac_includes_default
- +int
- +main ()
- +{
- +if ((off_t *) 0)
- + return 0;
- +if (sizeof (off_t))
- + return 0;
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- ac_cv_type_off_t=yes
- else
- - rm -rf conftest*
- - ac_cv_type_off_t=no
- -fi
- -rm -f conftest*
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
-
- +ac_cv_type_off_t=no
- +fi
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
- -echo "$ac_t""$ac_cv_type_off_t" 1>&6
- -if test $ac_cv_type_off_t = no; then
- - cat >> confdefs.h <<\EOF
- +echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
- +echo "${ECHO_T}$ac_cv_type_off_t" >&6
- +if test $ac_cv_type_off_t = yes; then
- + :
- +else
- +
- +cat >>confdefs.h <<_ACEOF
- #define off_t long
- -EOF
- +_ACEOF
-
- fi
-
- -echo $ac_n "checking for size_t""... $ac_c" 1>&6
- -echo "configure:3075: checking for size_t" >&5
- -if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 3080 "configure"
- -#include "confdefs.h"
- -#include <sys/types.h>
- -#if STDC_HEADERS
- -#include <stdlib.h>
- -#include <stddef.h>
- -#endif
- -EOF
- -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- - egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- - rm -rf conftest*
- +echo "$as_me:$LINENO: checking for size_t" >&5
- +echo $ECHO_N "checking for size_t... $ECHO_C" >&6
- +if test "${ac_cv_type_size_t+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +$ac_includes_default
- +int
- +main ()
- +{
- +if ((size_t *) 0)
- + return 0;
- +if (sizeof (size_t))
- + return 0;
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- ac_cv_type_size_t=yes
- else
- - rm -rf conftest*
- - ac_cv_type_size_t=no
- -fi
- -rm -f conftest*
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
-
- +ac_cv_type_size_t=no
- fi
- -echo "$ac_t""$ac_cv_type_size_t" 1>&6
- -if test $ac_cv_type_size_t = no; then
- - cat >> confdefs.h <<\EOF
- +rm -f conftest.$ac_objext conftest.$ac_ext
- +fi
- +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
- +echo "${ECHO_T}$ac_cv_type_size_t" >&6
- +if test $ac_cv_type_size_t = yes; then
- + :
- +else
- +
- +cat >>confdefs.h <<_ACEOF
- #define size_t unsigned
- -EOF
- +_ACEOF
-
- fi
-
- # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
- # for constant arguments. Useless!
- -echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
- -echo "configure:3110: checking for working alloca.h" >&5
- -if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 3115 "configure"
- -#include "confdefs.h"
- +echo "$as_me:$LINENO: checking for working alloca.h" >&5
- +echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
- +if test "${ac_cv_working_alloca_h+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- #include <alloca.h>
- -int main() {
- -char *p = alloca(2 * sizeof(int));
- -; return 0; }
- -EOF
- -if { (eval echo configure:3122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- - rm -rf conftest*
- - ac_cv_header_alloca_h=yes
- -else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - ac_cv_header_alloca_h=no
- -fi
- -rm -f conftest*
- -fi
- +int
- +main ()
- +{
- +char *p = (char *) alloca (2 * sizeof (int));
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + ac_cv_working_alloca_h=yes
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +ac_cv_working_alloca_h=no
- +fi
- +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- +fi
- +echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
- +echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
- +if test $ac_cv_working_alloca_h = yes; then
-
- -echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
- -if test $ac_cv_header_alloca_h = yes; then
- - cat >> confdefs.h <<\EOF
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_ALLOCA_H 1
- -EOF
- +_ACEOF
-
- fi
-
- -echo $ac_n "checking for alloca""... $ac_c" 1>&6
- -echo "configure:3143: checking for alloca" >&5
- -if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 3148 "configure"
- -#include "confdefs.h"
- -
- +echo "$as_me:$LINENO: checking for alloca" >&5
- +echo $ECHO_N "checking for alloca... $ECHO_C" >&6
- +if test "${ac_cv_func_alloca_works+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- #ifdef __GNUC__
- # define alloca __builtin_alloca
- #else
- @@ -3168,137 +5693,190 @@
- # endif
- #endif
-
- -int main() {
- -char *p = (char *) alloca(1);
- -; return 0; }
- -EOF
- -if { (eval echo configure:3176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- - rm -rf conftest*
- +int
- +main ()
- +{
- +char *p = (char *) alloca (1);
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- ac_cv_func_alloca_works=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - ac_cv_func_alloca_works=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +ac_cv_func_alloca_works=no
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- fi
- +echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
- +echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
-
- -echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
- if test $ac_cv_func_alloca_works = yes; then
- - cat >> confdefs.h <<\EOF
- -#define HAVE_ALLOCA 1
- -EOF
-
- -fi
- +cat >>confdefs.h <<\_ACEOF
- +#define HAVE_ALLOCA 1
- +_ACEOF
-
- -if test $ac_cv_func_alloca_works = no; then
- +else
- # The SVR3 libPW and SVR4 libucb both contain incompatible functions
- - # that cause trouble. Some versions do not even contain alloca or
- - # contain a buggy version. If you still want to use their alloca,
- - # use ar to extract alloca.o from them instead of compiling alloca.c.
- - ALLOCA=alloca.${ac_objext}
- - cat >> confdefs.h <<\EOF
- +# that cause trouble. Some versions do not even contain alloca or
- +# contain a buggy version. If you still want to use their alloca,
- +# use ar to extract alloca.o from them instead of compiling alloca.c.
- +
- +ALLOCA=alloca.$ac_objext
- +
- +cat >>confdefs.h <<\_ACEOF
- #define C_ALLOCA 1
- -EOF
- +_ACEOF
-
-
- -echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
- -echo "configure:3208: checking whether alloca needs Cray hooks" >&5
- -if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 3213 "configure"
- -#include "confdefs.h"
- +echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
- +echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
- +if test "${ac_cv_os_cray+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- #if defined(CRAY) && ! defined(CRAY2)
- webecray
- #else
- wenotbecray
- #endif
-
- -EOF
- +_ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- - egrep "webecray" >/dev/null 2>&1; then
- - rm -rf conftest*
- + $EGREP "webecray" >/dev/null 2>&1; then
- ac_cv_os_cray=yes
- else
- - rm -rf conftest*
- ac_cv_os_cray=no
- fi
- rm -f conftest*
-
- fi
- -
- -echo "$ac_t""$ac_cv_os_cray" 1>&6
- +echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
- +echo "${ECHO_T}$ac_cv_os_cray" >&6
- if test $ac_cv_os_cray = yes; then
- -for ac_func in _getb67 GETB67 getb67; do
- - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- -echo "configure:3238: checking for $ac_func" >&5
- -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 3243 "configure"
- -#include "confdefs.h"
- + for ac_func in _getb67 GETB67 getb67; do
- + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
- +echo "$as_me:$LINENO: checking for $ac_func" >&5
- +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
- +if eval "test \"\${$as_ac_var+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- /* System header to define __stub macros and hopefully few prototypes,
- - which can conflict with char $ac_func(); below. */
- -#include <assert.h>
- + which can conflict with char $ac_func (); below.
- + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- + <limits.h> exists even on freestanding compilers. */
- +#ifdef __STDC__
- +# include <limits.h>
- +#else
- +# include <assert.h>
- +#endif
- /* Override any gcc2 internal prototype to avoid an error. */
- +#ifdef __cplusplus
- +extern "C"
- +{
- +#endif
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- -char $ac_func();
- -
- -int main() {
- -
- +char $ac_func ();
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- -$ac_func();
- +char (*f) () = $ac_func;
- +#endif
- +#ifdef __cplusplus
- +}
- #endif
-
- -; return 0; }
- -EOF
- -if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- - rm -rf conftest*
- - eval "ac_cv_func_$ac_func=yes"
- -else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - eval "ac_cv_func_$ac_func=no"
- -fi
- -rm -f conftest*
- -fi
- +int
- +main ()
- +{
- +return f != $ac_func;
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + eval "$as_ac_var=yes"
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +eval "$as_ac_var=no"
- +fi
- +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- +fi
- +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
- +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
- +if test `eval echo '${'$as_ac_var'}'` = yes; then
-
- -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- - echo "$ac_t""yes" 1>&6
- - cat >> confdefs.h <<EOF
- +cat >>confdefs.h <<_ACEOF
- #define CRAY_STACKSEG_END $ac_func
- -EOF
- +_ACEOF
-
- break
- -else
- - echo "$ac_t""no" 1>&6
- fi
-
- -done
- + done
- fi
-
- -echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
- -echo "configure:3293: checking stack direction for C alloca" >&5
- -if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
- +echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
- +if test "${ac_cv_c_stack_direction+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- if test "$cross_compiling" = yes; then
- ac_cv_c_stack_direction=0
- else
- - cat > conftest.$ac_ext <<EOF
- -#line 3301 "configure"
- -#include "confdefs.h"
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +int
- find_stack_direction ()
- {
- static char *addr = 0;
- @@ -3311,138 +5889,291 @@
- else
- return (&dummy > addr) ? 1 : -1;
- }
- +
- +int
- main ()
- {
- - exit (find_stack_direction() < 0);
- -}
- -EOF
- -if { (eval echo configure:3320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- -then
- + exit (find_stack_direction () < 0);
- +}
- +_ACEOF
- +rm -f conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- ac_cv_c_stack_direction=1
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -fr conftest*
- - ac_cv_c_stack_direction=-1
- + echo "$as_me: program exited with status $ac_status" >&5
- +echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +( exit $ac_status )
- +ac_cv_c_stack_direction=-1
- fi
- -rm -fr conftest*
- +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
- -
- fi
- +echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
- +echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
-
- -echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
- -cat >> confdefs.h <<EOF
- +cat >>confdefs.h <<_ACEOF
- #define STACK_DIRECTION $ac_cv_c_stack_direction
- -EOF
- +_ACEOF
- +
-
- fi
-
- -for ac_hdr in unistd.h
- +
- +
- +for ac_header in stdlib.h unistd.h
- do
- -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
- -echo "configure:3345: checking for $ac_hdr" >&5
- -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 3350 "configure"
- -#include "confdefs.h"
- -#include <$ac_hdr>
- -EOF
- -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- -{ (eval echo configure:3355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- -if test -z "$ac_err"; then
- - rm -rf conftest*
- - eval "ac_cv_header_$ac_safe=yes"
- +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
- +if eval "test \"\${$as_ac_Header+set}\" = set"; then
- + echo "$as_me:$LINENO: checking for $ac_header" >&5
- +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
- +if eval "test \"\${$as_ac_Header+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +fi
- +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- +else
- + # Is the header compilable?
- +echo "$as_me:$LINENO: checking $ac_header usability" >&5
- +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +$ac_includes_default
- +#include <$ac_header>
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + ac_header_compiler=yes
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +ac_header_compiler=no
- +fi
- +rm -f conftest.$ac_objext conftest.$ac_ext
- +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- +echo "${ECHO_T}$ac_header_compiler" >&6
- +
- +# Is the header present?
- +echo "$as_me:$LINENO: checking $ac_header presence" >&5
- +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +#include <$ac_header>
- +_ACEOF
- +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- + ac_status=$?
- + grep -v '^ *+' conftest.er1 >conftest.err
- + rm -f conftest.er1
- + cat conftest.err >&5
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } >/dev/null; then
- + if test -s conftest.err; then
- + ac_cpp_err=$ac_c_preproc_warn_flag
- + else
- + ac_cpp_err=
- + fi
- +else
- + ac_cpp_err=yes
- +fi
- +if test -z "$ac_cpp_err"; then
- + ac_header_preproc=yes
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- + ac_header_preproc=no
- +fi
- +rm -f conftest.err conftest.$ac_ext
- +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
- +echo "${ECHO_T}$ac_header_preproc" >&6
- +
- +# So? What about this header?
- +case $ac_header_compiler:$ac_header_preproc in
- + yes:no )
- + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- + (
- + cat <<\_ASBOX
- +## ------------------------------------ ##
- +## Report this to bug-autoconf@gnu.org. ##
- +## ------------------------------------ ##
- +_ASBOX
- + ) |
- + sed "s/^/$as_me: WARNING: /" >&2
- + ;;
- + no:yes )
- + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
- +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- + (
- + cat <<\_ASBOX
- +## ------------------------------------ ##
- +## Report this to bug-autoconf@gnu.org. ##
- +## ------------------------------------ ##
- +_ASBOX
- + ) |
- + sed "s/^/$as_me: WARNING: /" >&2
- + ;;
- +esac
- +echo "$as_me:$LINENO: checking for $ac_header" >&5
- +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
- +if eval "test \"\${$as_ac_Header+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - echo "$ac_err" >&5
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - eval "ac_cv_header_$ac_safe=no"
- + eval "$as_ac_Header=$ac_header_preproc"
- fi
- -rm -f conftest*
- +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- +
- fi
- -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- - echo "$ac_t""yes" 1>&6
- - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- - cat >> confdefs.h <<EOF
- -#define $ac_tr_hdr 1
- -EOF
- +if test `eval echo '${'$as_ac_Header'}'` = yes; then
- + cat >>confdefs.h <<_ACEOF
- +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
- +_ACEOF
-
- -else
- - echo "$ac_t""no" 1>&6
- fi
- +
- done
-
- +
- for ac_func in getpagesize
- do
- -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- -echo "configure:3384: checking for $ac_func" >&5
- -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 3389 "configure"
- -#include "confdefs.h"
- +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
- +echo "$as_me:$LINENO: checking for $ac_func" >&5
- +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
- +if eval "test \"\${$as_ac_var+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- /* System header to define __stub macros and hopefully few prototypes,
- - which can conflict with char $ac_func(); below. */
- -#include <assert.h>
- + which can conflict with char $ac_func (); below.
- + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- + <limits.h> exists even on freestanding compilers. */
- +#ifdef __STDC__
- +# include <limits.h>
- +#else
- +# include <assert.h>
- +#endif
- /* Override any gcc2 internal prototype to avoid an error. */
- +#ifdef __cplusplus
- +extern "C"
- +{
- +#endif
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- -char $ac_func();
- -
- -int main() {
- -
- +char $ac_func ();
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- -$ac_func();
- +char (*f) () = $ac_func;
- +#endif
- +#ifdef __cplusplus
- +}
- #endif
-
- -; return 0; }
- -EOF
- -if { (eval echo configure:3412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- - rm -rf conftest*
- - eval "ac_cv_func_$ac_func=yes"
- -else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - eval "ac_cv_func_$ac_func=no"
- -fi
- -rm -f conftest*
- -fi
- -
- -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- - echo "$ac_t""yes" 1>&6
- - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- - cat >> confdefs.h <<EOF
- -#define $ac_tr_func 1
- -EOF
- +int
- +main ()
- +{
- +return f != $ac_func;
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + eval "$as_ac_var=yes"
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +eval "$as_ac_var=no"
- +fi
- +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- +fi
- +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
- +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
- +if test `eval echo '${'$as_ac_var'}'` = yes; then
- + cat >>confdefs.h <<_ACEOF
- +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
- +_ACEOF
-
- -else
- - echo "$ac_t""no" 1>&6
- fi
- done
-
- -echo $ac_n "checking for working mmap""... $ac_c" 1>&6
- -echo "configure:3437: checking for working mmap" >&5
- -if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +echo "$as_me:$LINENO: checking for working mmap" >&5
- +echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
- +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- if test "$cross_compiling" = yes; then
- ac_cv_func_mmap_fixed_mapped=no
- else
- - cat > conftest.$ac_ext <<EOF
- -#line 3445 "configure"
- -#include "confdefs.h"
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +$ac_includes_default
- +/* malloc might have been renamed as rpl_malloc. */
- +#undef malloc
-
- /* Thanks to Mike Haertel and Jim Avera for this test.
- Here is a matrix of mmap possibilities:
- @@ -3456,34 +6187,34 @@
- back from the file, nor mmap's back from the file at a different
- address. (There have been systems where private was not correctly
- implemented like the infamous i386 svr4.0, and systems where the
- - VM page cache was not coherent with the filesystem buffer cache
- + VM page cache was not coherent with the file system buffer cache
- like early versions of FreeBSD and possibly contemporary NetBSD.)
- For shared mappings, we should conversely verify that changes get
- - propogated back to all the places they're supposed to be.
- + propagated back to all the places they're supposed to be.
-
- Grep wants private fixed already mapped.
- The main things grep needs to know about mmap are:
- * does it exist and is it safe to write into the mmap'd area
- * how to use it (BSD variants) */
- -#include <sys/types.h>
- +
- #include <fcntl.h>
- #include <sys/mman.h>
-
- -/* This mess was copied from the GNU getpagesize.h. */
- -#ifndef HAVE_GETPAGESIZE
- -# ifdef HAVE_UNISTD_H
- -# include <unistd.h>
- -# endif
- +#if !STDC_HEADERS && !HAVE_STDLIB_H
- +char *malloc ();
- +#endif
-
- +/* This mess was copied from the GNU getpagesize.h. */
- +#if !HAVE_GETPAGESIZE
- /* Assume that all systems that can run configure have sys/param.h. */
- -# ifndef HAVE_SYS_PARAM_H
- +# if !HAVE_SYS_PARAM_H
- # define HAVE_SYS_PARAM_H 1
- # endif
-
- # ifdef _SC_PAGESIZE
- # define getpagesize() sysconf(_SC_PAGESIZE)
- # else /* no _SC_PAGESIZE */
- -# ifdef HAVE_SYS_PARAM_H
- +# if HAVE_SYS_PARAM_H
- # include <sys/param.h>
- # ifdef EXEC_PAGESIZE
- # define getpagesize() EXEC_PAGESIZE
- @@ -3510,327 +6241,524 @@
-
- #endif /* no HAVE_GETPAGESIZE */
-
- -#ifdef __cplusplus
- -extern "C" { void *malloc(unsigned); }
- -#else
- -char *malloc();
- -#endif
- -
- int
- -main()
- +main ()
- {
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
-
- - pagesize = getpagesize();
- + pagesize = getpagesize ();
-
- - /*
- - * First, make a file with some known garbage in it.
- - */
- - data = malloc(pagesize);
- + /* First, make a file with some known garbage in it. */
- + data = (char *) malloc (pagesize);
- if (!data)
- - exit(1);
- + exit (1);
- for (i = 0; i < pagesize; ++i)
- - *(data + i) = rand();
- - umask(0);
- - fd = creat("conftestmmap", 0600);
- + *(data + i) = rand ();
- + umask (0);
- + fd = creat ("conftest.mmap", 0600);
- if (fd < 0)
- - exit(1);
- - if (write(fd, data, pagesize) != pagesize)
- - exit(1);
- - close(fd);
- -
- - /*
- - * Next, try to mmap the file at a fixed address which
- - * already has something else allocated at it. If we can,
- - * also make sure that we see the same garbage.
- - */
- - fd = open("conftestmmap", O_RDWR);
- + exit (1);
- + if (write (fd, data, pagesize) != pagesize)
- + exit (1);
- + close (fd);
- +
- + /* Next, try to mmap the file at a fixed address which already has
- + something else allocated at it. If we can, also make sure that
- + we see the same garbage. */
- + fd = open ("conftest.mmap", O_RDWR);
- if (fd < 0)
- - exit(1);
- - data2 = malloc(2 * pagesize);
- + exit (1);
- + data2 = (char *) malloc (2 * pagesize);
- if (!data2)
- - exit(1);
- + exit (1);
- data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
- - if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
- + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- - exit(1);
- + exit (1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- - exit(1);
- + exit (1);
-
- - /*
- - * Finally, make sure that changes to the mapped area
- - * do not percolate back to the file as seen by read().
- - * (This is a bug on some variants of i386 svr4.0.)
- - */
- + /* Finally, make sure that changes to the mapped area do not
- + percolate back to the file as seen by read(). (This is a bug on
- + some variants of i386 svr4.0.) */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- - data3 = malloc(pagesize);
- + data3 = (char *) malloc (pagesize);
- if (!data3)
- - exit(1);
- - if (read(fd, data3, pagesize) != pagesize)
- - exit(1);
- + exit (1);
- + if (read (fd, data3, pagesize) != pagesize)
- + exit (1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- - exit(1);
- - close(fd);
- - unlink("conftestmmap");
- - exit(0);
- + exit (1);
- + close (fd);
- + exit (0);
- }
- -
- -EOF
- -if { (eval echo configure:3585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- -then
- +_ACEOF
- +rm -f conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- ac_cv_func_mmap_fixed_mapped=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -fr conftest*
- - ac_cv_func_mmap_fixed_mapped=no
- + echo "$as_me: program exited with status $ac_status" >&5
- +echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +( exit $ac_status )
- +ac_cv_func_mmap_fixed_mapped=no
- fi
- -rm -fr conftest*
- +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
- -
- fi
- -
- -echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
- +echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
- +echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
- if test $ac_cv_func_mmap_fixed_mapped = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_MMAP 1
- -EOF
- +_ACEOF
-
- fi
- +rm -f conftest.mmap
-
-
- - for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
- unistd.h values.h sys/param.h
- do
- -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
- -echo "configure:3613: checking for $ac_hdr" >&5
- -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 3618 "configure"
- -#include "confdefs.h"
- -#include <$ac_hdr>
- -EOF
- -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- -{ (eval echo configure:3623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- -if test -z "$ac_err"; then
- - rm -rf conftest*
- - eval "ac_cv_header_$ac_safe=yes"
- +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
- +if eval "test \"\${$as_ac_Header+set}\" = set"; then
- + echo "$as_me:$LINENO: checking for $ac_header" >&5
- +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
- +if eval "test \"\${$as_ac_Header+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +fi
- +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- +else
- + # Is the header compilable?
- +echo "$as_me:$LINENO: checking $ac_header usability" >&5
- +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +$ac_includes_default
- +#include <$ac_header>
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + ac_header_compiler=yes
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +ac_header_compiler=no
- +fi
- +rm -f conftest.$ac_objext conftest.$ac_ext
- +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- +echo "${ECHO_T}$ac_header_compiler" >&6
- +
- +# Is the header present?
- +echo "$as_me:$LINENO: checking $ac_header presence" >&5
- +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +#include <$ac_header>
- +_ACEOF
- +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- + ac_status=$?
- + grep -v '^ *+' conftest.er1 >conftest.err
- + rm -f conftest.er1
- + cat conftest.err >&5
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } >/dev/null; then
- + if test -s conftest.err; then
- + ac_cpp_err=$ac_c_preproc_warn_flag
- + else
- + ac_cpp_err=
- + fi
- +else
- + ac_cpp_err=yes
- +fi
- +if test -z "$ac_cpp_err"; then
- + ac_header_preproc=yes
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- + ac_header_preproc=no
- +fi
- +rm -f conftest.err conftest.$ac_ext
- +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
- +echo "${ECHO_T}$ac_header_preproc" >&6
- +
- +# So? What about this header?
- +case $ac_header_compiler:$ac_header_preproc in
- + yes:no )
- + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- + (
- + cat <<\_ASBOX
- +## ------------------------------------ ##
- +## Report this to bug-autoconf@gnu.org. ##
- +## ------------------------------------ ##
- +_ASBOX
- + ) |
- + sed "s/^/$as_me: WARNING: /" >&2
- + ;;
- + no:yes )
- + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
- +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- + (
- + cat <<\_ASBOX
- +## ------------------------------------ ##
- +## Report this to bug-autoconf@gnu.org. ##
- +## ------------------------------------ ##
- +_ASBOX
- + ) |
- + sed "s/^/$as_me: WARNING: /" >&2
- + ;;
- +esac
- +echo "$as_me:$LINENO: checking for $ac_header" >&5
- +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
- +if eval "test \"\${$as_ac_Header+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - echo "$ac_err" >&5
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - eval "ac_cv_header_$ac_safe=no"
- + eval "$as_ac_Header=$ac_header_preproc"
- fi
- -rm -f conftest*
- +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- +
- fi
- -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- - echo "$ac_t""yes" 1>&6
- - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- - cat >> confdefs.h <<EOF
- -#define $ac_tr_hdr 1
- -EOF
- +if test `eval echo '${'$as_ac_Header'}'` = yes; then
- + cat >>confdefs.h <<_ACEOF
- +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
- +_ACEOF
-
- -else
- - echo "$ac_t""no" 1>&6
- fi
- +
- done
-
- - for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
- __argz_count __argz_stringify __argz_next
- do
- -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- -echo "configure:3653: checking for $ac_func" >&5
- -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 3658 "configure"
- -#include "confdefs.h"
- +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
- +echo "$as_me:$LINENO: checking for $ac_func" >&5
- +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
- +if eval "test \"\${$as_ac_var+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- /* System header to define __stub macros and hopefully few prototypes,
- - which can conflict with char $ac_func(); below. */
- -#include <assert.h>
- + which can conflict with char $ac_func (); below.
- + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- + <limits.h> exists even on freestanding compilers. */
- +#ifdef __STDC__
- +# include <limits.h>
- +#else
- +# include <assert.h>
- +#endif
- /* Override any gcc2 internal prototype to avoid an error. */
- +#ifdef __cplusplus
- +extern "C"
- +{
- +#endif
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- -char $ac_func();
- -
- -int main() {
- -
- +char $ac_func ();
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- -$ac_func();
- +char (*f) () = $ac_func;
- +#endif
- +#ifdef __cplusplus
- +}
- #endif
-
- -; return 0; }
- -EOF
- -if { (eval echo configure:3681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- - rm -rf conftest*
- - eval "ac_cv_func_$ac_func=yes"
- -else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - eval "ac_cv_func_$ac_func=no"
- -fi
- -rm -f conftest*
- -fi
- -
- -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- - echo "$ac_t""yes" 1>&6
- - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- - cat >> confdefs.h <<EOF
- -#define $ac_tr_func 1
- -EOF
- +int
- +main ()
- +{
- +return f != $ac_func;
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + eval "$as_ac_var=yes"
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +eval "$as_ac_var=no"
- +fi
- +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- +fi
- +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
- +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
- +if test `eval echo '${'$as_ac_var'}'` = yes; then
- + cat >>confdefs.h <<_ACEOF
- +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
- +_ACEOF
-
- -else
- - echo "$ac_t""no" 1>&6
- fi
- done
-
-
- if test "${ac_cv_func_stpcpy+set}" != "set"; then
- - for ac_func in stpcpy
- +
- +for ac_func in stpcpy
- do
- -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- -echo "configure:3710: checking for $ac_func" >&5
- -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 3715 "configure"
- -#include "confdefs.h"
- +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
- +echo "$as_me:$LINENO: checking for $ac_func" >&5
- +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
- +if eval "test \"\${$as_ac_var+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- /* System header to define __stub macros and hopefully few prototypes,
- - which can conflict with char $ac_func(); below. */
- -#include <assert.h>
- + which can conflict with char $ac_func (); below.
- + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- + <limits.h> exists even on freestanding compilers. */
- +#ifdef __STDC__
- +# include <limits.h>
- +#else
- +# include <assert.h>
- +#endif
- /* Override any gcc2 internal prototype to avoid an error. */
- +#ifdef __cplusplus
- +extern "C"
- +{
- +#endif
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- -char $ac_func();
- -
- -int main() {
- -
- +char $ac_func ();
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- -$ac_func();
- +char (*f) () = $ac_func;
- +#endif
- +#ifdef __cplusplus
- +}
- #endif
-
- -; return 0; }
- -EOF
- -if { (eval echo configure:3738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- - rm -rf conftest*
- - eval "ac_cv_func_$ac_func=yes"
- -else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - eval "ac_cv_func_$ac_func=no"
- -fi
- -rm -f conftest*
- -fi
- -
- -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- - echo "$ac_t""yes" 1>&6
- - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- - cat >> confdefs.h <<EOF
- -#define $ac_tr_func 1
- -EOF
- +int
- +main ()
- +{
- +return f != $ac_func;
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + eval "$as_ac_var=yes"
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +eval "$as_ac_var=no"
- +fi
- +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- +fi
- +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
- +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
- +if test `eval echo '${'$as_ac_var'}'` = yes; then
- + cat >>confdefs.h <<_ACEOF
- +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
- +_ACEOF
-
- -else
- - echo "$ac_t""no" 1>&6
- fi
- done
-
- fi
- if test "${ac_cv_func_stpcpy}" = "yes"; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_STPCPY 1
- -EOF
- +_ACEOF
-
- fi
-
- if test $ac_cv_header_locale_h = yes; then
- - echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
- -echo "configure:3772: checking for LC_MESSAGES" >&5
- -if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 3777 "configure"
- -#include "confdefs.h"
- + echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
- +echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
- +if test "${am_cv_val_LC_MESSAGES+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- #include <locale.h>
- -int main() {
- +int
- +main ()
- +{
- return LC_MESSAGES
- -; return 0; }
- -EOF
- -if { (eval echo configure:3784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- am_cv_val_LC_MESSAGES=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - am_cv_val_LC_MESSAGES=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +am_cv_val_LC_MESSAGES=no
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- fi
- -
- -echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
- +echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
- +echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
- if test $am_cv_val_LC_MESSAGES = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_LC_MESSAGES 1
- -EOF
- +_ACEOF
-
- fi
- fi
- - echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
- -echo "configure:3805: checking whether NLS is requested" >&5
- + echo "$as_me:$LINENO: checking whether NLS is requested" >&5
- +echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
- # Check whether --enable-nls or --disable-nls was given.
- if test "${enable_nls+set}" = set; then
- enableval="$enable_nls"
- USE_NLS=$enableval
- else
- USE_NLS=yes
- -fi
- -
- - echo "$ac_t""$USE_NLS" 1>&6
- +fi;
- + echo "$as_me:$LINENO: result: $USE_NLS" >&5
- +echo "${ECHO_T}$USE_NLS" >&6
-
-
- USE_INCLUDED_LIBINTL=no
-
- if test "$USE_NLS" = "yes"; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define ENABLE_NLS 1
- -EOF
- +_ACEOF
- +
- + echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
- +echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
-
- - echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
- -echo "configure:3825: checking whether included gettext is requested" >&5
- - # Check whether --with-included-gettext or --without-included-gettext was given.
- +# Check whether --with-included-gettext or --without-included-gettext was given.
- if test "${with_included_gettext+set}" = set; then
- withval="$with_included_gettext"
- nls_cv_force_use_gnu_gettext=$withval
- else
- nls_cv_force_use_gnu_gettext=no
- -fi
- -
- - echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
- +fi;
- + echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5
- +echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
-
- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
- @@ -3838,141 +6766,298 @@
- nls_cv_header_libgt=
- CATOBJEXT=NONE
-
- - ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
- -echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
- -echo "configure:3844: checking for libintl.h" >&5
- -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 3849 "configure"
- -#include "confdefs.h"
- + if test "${ac_cv_header_libintl_h+set}" = set; then
- + echo "$as_me:$LINENO: checking for libintl.h" >&5
- +echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
- +if test "${ac_cv_header_libintl_h+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +fi
- +echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
- +echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
- +else
- + # Is the header compilable?
- +echo "$as_me:$LINENO: checking libintl.h usability" >&5
- +echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +$ac_includes_default
- #include <libintl.h>
- -EOF
- -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- -{ (eval echo configure:3854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- -if test -z "$ac_err"; then
- - rm -rf conftest*
- - eval "ac_cv_header_$ac_safe=yes"
- -else
- - echo "$ac_err" >&5
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - eval "ac_cv_header_$ac_safe=no"
- -fi
- -rm -f conftest*
- -fi
- -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- - echo "$ac_t""yes" 1>&6
- - echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
- -echo "configure:3871: checking for gettext in libc" >&5
- -if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 3876 "configure"
- -#include "confdefs.h"
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + ac_header_compiler=yes
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +ac_header_compiler=no
- +fi
- +rm -f conftest.$ac_objext conftest.$ac_ext
- +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- +echo "${ECHO_T}$ac_header_compiler" >&6
- +
- +# Is the header present?
- +echo "$as_me:$LINENO: checking libintl.h presence" >&5
- +echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +#include <libintl.h>
- +_ACEOF
- +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- + ac_status=$?
- + grep -v '^ *+' conftest.er1 >conftest.err
- + rm -f conftest.er1
- + cat conftest.err >&5
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } >/dev/null; then
- + if test -s conftest.err; then
- + ac_cpp_err=$ac_c_preproc_warn_flag
- + else
- + ac_cpp_err=
- + fi
- +else
- + ac_cpp_err=yes
- +fi
- +if test -z "$ac_cpp_err"; then
- + ac_header_preproc=yes
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- + ac_header_preproc=no
- +fi
- +rm -f conftest.err conftest.$ac_ext
- +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
- +echo "${ECHO_T}$ac_header_preproc" >&6
- +
- +# So? What about this header?
- +case $ac_header_compiler:$ac_header_preproc in
- + yes:no )
- + { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
- +echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- + { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
- +echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
- + (
- + cat <<\_ASBOX
- +## ------------------------------------ ##
- +## Report this to bug-autoconf@gnu.org. ##
- +## ------------------------------------ ##
- +_ASBOX
- + ) |
- + sed "s/^/$as_me: WARNING: /" >&2
- + ;;
- + no:yes )
- + { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
- +echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
- + { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
- +echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
- + { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
- +echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
- + (
- + cat <<\_ASBOX
- +## ------------------------------------ ##
- +## Report this to bug-autoconf@gnu.org. ##
- +## ------------------------------------ ##
- +_ASBOX
- + ) |
- + sed "s/^/$as_me: WARNING: /" >&2
- + ;;
- +esac
- +echo "$as_me:$LINENO: checking for libintl.h" >&5
- +echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
- +if test "${ac_cv_header_libintl_h+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + ac_cv_header_libintl_h=$ac_header_preproc
- +fi
- +echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
- +echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
- +
- +fi
- +if test $ac_cv_header_libintl_h = yes; then
- + echo "$as_me:$LINENO: checking for gettext in libc" >&5
- +echo $ECHO_N "checking for gettext in libc... $ECHO_C" >&6
- +if test "${gt_cv_func_gettext_libc+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- #include <libintl.h>
- -int main() {
- +int
- +main ()
- +{
- return (int) gettext ("")
- -; return 0; }
- -EOF
- -if { (eval echo configure:3883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- gt_cv_func_gettext_libc=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - gt_cv_func_gettext_libc=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +gt_cv_func_gettext_libc=no
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- fi
- -
- -echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
- +echo "$as_me:$LINENO: result: $gt_cv_func_gettext_libc" >&5
- +echo "${ECHO_T}$gt_cv_func_gettext_libc" >&6
-
- if test "$gt_cv_func_gettext_libc" != "yes"; then
- - echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
- -echo "configure:3899: checking for bindtextdomain in -lintl" >&5
- -ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
- -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- + echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
- +echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
- +if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - ac_save_LIBS="$LIBS"
- + ac_check_lib_save_LIBS=$LIBS
- LIBS="-lintl $LIBS"
- -cat > conftest.$ac_ext <<EOF
- -#line 3907 "configure"
- -#include "confdefs.h"
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +
- /* Override any gcc2 internal prototype to avoid an error. */
- +#ifdef __cplusplus
- +extern "C"
- +#endif
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- -char bindtextdomain();
- -
- -int main() {
- -bindtextdomain()
- -; return 0; }
- -EOF
- -if { (eval echo configure:3918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- - rm -rf conftest*
- - eval "ac_cv_lib_$ac_lib_var=yes"
- -else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - eval "ac_cv_lib_$ac_lib_var=no"
- -fi
- -rm -f conftest*
- -LIBS="$ac_save_LIBS"
- -
- -fi
- -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- - echo "$ac_t""yes" 1>&6
- - echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
- -echo "configure:3934: checking for gettext in libintl" >&5
- -if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 3939 "configure"
- -#include "confdefs.h"
- +char bindtextdomain ();
- +int
- +main ()
- +{
- +bindtextdomain ();
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + ac_cv_lib_intl_bindtextdomain=yes
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +ac_cv_lib_intl_bindtextdomain=no
- +fi
- +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- +LIBS=$ac_check_lib_save_LIBS
- +fi
- +echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
- +echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
- +if test $ac_cv_lib_intl_bindtextdomain = yes; then
- + echo "$as_me:$LINENO: checking for gettext in libintl" >&5
- +echo $ECHO_N "checking for gettext in libintl... $ECHO_C" >&6
- +if test "${gt_cv_func_gettext_libintl+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- -int main() {
- +int
- +main ()
- +{
- return (int) gettext ("")
- -; return 0; }
- -EOF
- -if { (eval echo configure:3946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- gt_cv_func_gettext_libintl=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - gt_cv_func_gettext_libintl=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +gt_cv_func_gettext_libintl=no
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- fi
- -
- -echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
- -else
- - echo "$ac_t""no" 1>&6
- +echo "$as_me:$LINENO: result: $gt_cv_func_gettext_libintl" >&5
- +echo "${ECHO_T}$gt_cv_func_gettext_libintl" >&6
- fi
-
- fi
-
- if test "$gt_cv_func_gettext_libc" = "yes" \
- || test "$gt_cv_func_gettext_libintl" = "yes"; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_GETTEXT 1
- -EOF
- +_ACEOF
-
- # Extract the first word of "msgfmt", so it can be a program name with args.
- set dummy msgfmt; ac_word=$2
- -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- -echo "configure:3974: checking for $ac_word" >&5
- -if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_path_MSGFMT+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- case "$MSGFMT" in
- /*)
- @@ -3996,108 +7081,143 @@
- fi
- MSGFMT="$ac_cv_path_MSGFMT"
- if test -n "$MSGFMT"; then
- - echo "$ac_t""$MSGFMT" 1>&6
- + echo "$as_me:$LINENO: result: $MSGFMT" >&5
- +echo "${ECHO_T}$MSGFMT" >&6
- else
- - echo "$ac_t""no" 1>&6
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
- if test "$MSGFMT" != "no"; then
- - for ac_func in dcgettext
- +
- +for ac_func in dcgettext
- do
- -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- -echo "configure:4008: checking for $ac_func" >&5
- -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 4013 "configure"
- -#include "confdefs.h"
- +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
- +echo "$as_me:$LINENO: checking for $ac_func" >&5
- +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
- +if eval "test \"\${$as_ac_var+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- /* System header to define __stub macros and hopefully few prototypes,
- - which can conflict with char $ac_func(); below. */
- -#include <assert.h>
- + which can conflict with char $ac_func (); below.
- + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- + <limits.h> exists even on freestanding compilers. */
- +#ifdef __STDC__
- +# include <limits.h>
- +#else
- +# include <assert.h>
- +#endif
- /* Override any gcc2 internal prototype to avoid an error. */
- +#ifdef __cplusplus
- +extern "C"
- +{
- +#endif
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- -char $ac_func();
- -
- -int main() {
- -
- +char $ac_func ();
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- -$ac_func();
- +char (*f) () = $ac_func;
- +#endif
- +#ifdef __cplusplus
- +}
- #endif
-
- -; return 0; }
- -EOF
- -if { (eval echo configure:4036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- - rm -rf conftest*
- - eval "ac_cv_func_$ac_func=yes"
- -else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - eval "ac_cv_func_$ac_func=no"
- -fi
- -rm -f conftest*
- -fi
- -
- -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- - echo "$ac_t""yes" 1>&6
- - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- - cat >> confdefs.h <<EOF
- -#define $ac_tr_func 1
- -EOF
- +int
- +main ()
- +{
- +return f != $ac_func;
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + eval "$as_ac_var=yes"
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +eval "$as_ac_var=no"
- +fi
- +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- +fi
- +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
- +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
- +if test `eval echo '${'$as_ac_var'}'` = yes; then
- + cat >>confdefs.h <<_ACEOF
- +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
- +_ACEOF
-
- -else
- - echo "$ac_t""no" 1>&6
- fi
- done
-
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
- set dummy gmsgfmt; ac_word=$2
- -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- -echo "configure:4063: checking for $ac_word" >&5
- -if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_path_GMSGFMT+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - case "$GMSGFMT" in
- - /*)
- + case $GMSGFMT in
- + [\\/]* | ?:[\\/]*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
- ;;
- - ?:/*)
- - ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
- - ;;
- *)
- - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- - ac_dummy="$PATH"
- - for ac_dir in $ac_dummy; do
- - test -z "$ac_dir" && ac_dir=.
- - if test -f $ac_dir/$ac_word; then
- - ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
- - break
- + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- fi
- - done
- - IFS="$ac_save_ifs"
- +done
- +done
- +
- test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
- ;;
- esac
- fi
- -GMSGFMT="$ac_cv_path_GMSGFMT"
- +GMSGFMT=$ac_cv_path_GMSGFMT
- +
- if test -n "$GMSGFMT"; then
- - echo "$ac_t""$GMSGFMT" 1>&6
- + echo "$as_me:$LINENO: result: $GMSGFMT" >&5
- +echo "${ECHO_T}$GMSGFMT" >&6
- else
- - echo "$ac_t""no" 1>&6
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
-
- # Extract the first word of "xgettext", so it can be a program name with args.
- set dummy xgettext; ac_word=$2
- -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- -echo "configure:4099: checking for $ac_word" >&5
- -if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_path_XGETTEXT+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- case "$XGETTEXT" in
- /*)
- @@ -4121,38 +7241,56 @@
- fi
- XGETTEXT="$ac_cv_path_XGETTEXT"
- if test -n "$XGETTEXT"; then
- - echo "$ac_t""$XGETTEXT" 1>&6
- + echo "$as_me:$LINENO: result: $XGETTEXT" >&5
- +echo "${ECHO_T}$XGETTEXT" >&6
- else
- - echo "$ac_t""no" 1>&6
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
-
- - cat > conftest.$ac_ext <<EOF
- -#line 4131 "configure"
- -#include "confdefs.h"
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- -int main() {
- +int
- +main ()
- +{
- extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr
- -; return 0; }
- -EOF
- -if { (eval echo configure:4139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- CATOBJEXT=.gmo
- DATADIRNAME=share
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - CATOBJEXT=.mo
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +CATOBJEXT=.mo
- DATADIRNAME=lib
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- INSTOBJEXT=.mo
- fi
- fi
-
- -else
- - echo "$ac_t""no" 1>&6
- fi
-
-
- @@ -4166,10 +7304,10 @@
- INTLOBJS="\$(GETTOBJS)"
- # Extract the first word of "msgfmt", so it can be a program name with args.
- set dummy msgfmt; ac_word=$2
- -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- -echo "configure:4171: checking for $ac_word" >&5
- -if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_path_MSGFMT+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- case "$MSGFMT" in
- /*)
- @@ -4193,53 +7331,59 @@
- fi
- MSGFMT="$ac_cv_path_MSGFMT"
- if test -n "$MSGFMT"; then
- - echo "$ac_t""$MSGFMT" 1>&6
- + echo "$as_me:$LINENO: result: $MSGFMT" >&5
- +echo "${ECHO_T}$MSGFMT" >&6
- else
- - echo "$ac_t""no" 1>&6
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
-
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
- set dummy gmsgfmt; ac_word=$2
- -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- -echo "configure:4205: checking for $ac_word" >&5
- -if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_path_GMSGFMT+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - case "$GMSGFMT" in
- - /*)
- + case $GMSGFMT in
- + [\\/]* | ?:[\\/]*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
- ;;
- - ?:/*)
- - ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
- - ;;
- *)
- - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- - ac_dummy="$PATH"
- - for ac_dir in $ac_dummy; do
- - test -z "$ac_dir" && ac_dir=.
- - if test -f $ac_dir/$ac_word; then
- - ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
- - break
- + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
- + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- + break 2
- fi
- - done
- - IFS="$ac_save_ifs"
- +done
- +done
- +
- test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
- ;;
- esac
- fi
- -GMSGFMT="$ac_cv_path_GMSGFMT"
- +GMSGFMT=$ac_cv_path_GMSGFMT
- +
- if test -n "$GMSGFMT"; then
- - echo "$ac_t""$GMSGFMT" 1>&6
- + echo "$as_me:$LINENO: result: $GMSGFMT" >&5
- +echo "${ECHO_T}$GMSGFMT" >&6
- else
- - echo "$ac_t""no" 1>&6
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
-
- # Extract the first word of "xgettext", so it can be a program name with args.
- set dummy xgettext; ac_word=$2
- -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- -echo "configure:4241: checking for $ac_word" >&5
- -if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +echo "$as_me:$LINENO: checking for $ac_word" >&5
- +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- +if test "${ac_cv_path_XGETTEXT+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- case "$XGETTEXT" in
- /*)
- @@ -4263,9 +7407,11 @@
- fi
- XGETTEXT="$ac_cv_path_XGETTEXT"
- if test -n "$XGETTEXT"; then
- - echo "$ac_t""$XGETTEXT" 1>&6
- + echo "$as_me:$LINENO: result: $XGETTEXT" >&5
- +echo "${ECHO_T}$XGETTEXT" >&6
- else
- - echo "$ac_t""no" 1>&6
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
-
-
- @@ -4284,7 +7430,8 @@
- if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
- : ;
- else
- - echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
- + echo "$as_me:$LINENO: result: found xgettext programs is not GNU xgettext; ignore it" >&5
- +echo "${ECHO_T}found xgettext programs is not GNU xgettext; ignore it" >&6
- XGETTEXT=":"
- fi
- fi
- @@ -4326,8 +7473,8 @@
- if test "x$ALL_LINGUAS" = "x"; then
- LINGUAS=
- else
- - echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
- -echo "configure:4331: checking for catalogs to be installed" >&5
- + echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
- +echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
- NEW_LINGUAS=
- for lang in ${LINGUAS=$ALL_LINGUAS}; do
- case "$ALL_LINGUAS" in
- @@ -4335,7 +7482,8 @@
- esac
- done
- LINGUAS=$NEW_LINGUAS
- - echo "$ac_t""$LINGUAS" 1>&6
- + echo "$as_me:$LINENO: result: $LINGUAS" >&5
- +echo "${ECHO_T}$LINGUAS" >&6
- fi
-
- if test -n "$LINGUAS"; then
- @@ -4353,38 +7501,139 @@
-
- if test -f $srcdir/po2tbl.sed.in; then
- if test "$CATOBJEXT" = ".cat"; then
- - ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
- -echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
- -echo "configure:4359: checking for linux/version.h" >&5
- -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 4364 "configure"
- -#include "confdefs.h"
- + if test "${ac_cv_header_linux_version_h+set}" = set; then
- + echo "$as_me:$LINENO: checking for linux/version.h" >&5
- +echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
- +if test "${ac_cv_header_linux_version_h+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +fi
- +echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
- +echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
- +else
- + # Is the header compilable?
- +echo "$as_me:$LINENO: checking linux/version.h usability" >&5
- +echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +$ac_includes_default
- #include <linux/version.h>
- -EOF
- -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- -{ (eval echo configure:4369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- -if test -z "$ac_err"; then
- - rm -rf conftest*
- - eval "ac_cv_header_$ac_safe=yes"
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + ac_header_compiler=yes
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +ac_header_compiler=no
- +fi
- +rm -f conftest.$ac_objext conftest.$ac_ext
- +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- +echo "${ECHO_T}$ac_header_compiler" >&6
- +
- +# Is the header present?
- +echo "$as_me:$LINENO: checking linux/version.h presence" >&5
- +echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +#include <linux/version.h>
- +_ACEOF
- +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- + ac_status=$?
- + grep -v '^ *+' conftest.er1 >conftest.err
- + rm -f conftest.er1
- + cat conftest.err >&5
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } >/dev/null; then
- + if test -s conftest.err; then
- + ac_cpp_err=$ac_c_preproc_warn_flag
- + else
- + ac_cpp_err=
- + fi
- +else
- + ac_cpp_err=yes
- +fi
- +if test -z "$ac_cpp_err"; then
- + ac_header_preproc=yes
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- + ac_header_preproc=no
- +fi
- +rm -f conftest.err conftest.$ac_ext
- +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
- +echo "${ECHO_T}$ac_header_preproc" >&6
- +
- +# So? What about this header?
- +case $ac_header_compiler:$ac_header_preproc in
- + yes:no )
- + { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
- +echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- + { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
- +echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
- + (
- + cat <<\_ASBOX
- +## ------------------------------------ ##
- +## Report this to bug-autoconf@gnu.org. ##
- +## ------------------------------------ ##
- +_ASBOX
- + ) |
- + sed "s/^/$as_me: WARNING: /" >&2
- + ;;
- + no:yes )
- + { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
- +echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
- + { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5
- +echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;}
- + { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
- +echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
- + (
- + cat <<\_ASBOX
- +## ------------------------------------ ##
- +## Report this to bug-autoconf@gnu.org. ##
- +## ------------------------------------ ##
- +_ASBOX
- + ) |
- + sed "s/^/$as_me: WARNING: /" >&2
- + ;;
- +esac
- +echo "$as_me:$LINENO: checking for linux/version.h" >&5
- +echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
- +if test "${ac_cv_header_linux_version_h+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - echo "$ac_err" >&5
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - eval "ac_cv_header_$ac_safe=no"
- + ac_cv_header_linux_version_h=$ac_header_preproc
- fi
- -rm -f conftest*
- +echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
- +echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
- +
- fi
- -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- - echo "$ac_t""yes" 1>&6
- +if test $ac_cv_header_linux_version_h = yes; then
- msgformat=linux
- else
- - echo "$ac_t""no" 1>&6
- -msgformat=xopen
- + msgformat=xopen
- fi
-
-
- @@ -4438,60 +7687,73 @@
- # SunOS /usr/etc/install
- # IRIX /sbin/install
- # AIX /bin/install
- +# AmigaOS /C/install, which installs bootblocks on floppy discs
- # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
- # AFS /usr/afsws/bin/install, which mishandles nonexistent args
- # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
- # ./install, which can be erroneously created by make from ./install.sh.
- -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
- -echo "configure:4447: checking for a BSD compatible install" >&5
- +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
- +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
- if test -z "$INSTALL"; then
- -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +if test "${ac_cv_path_install+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- - for ac_dir in $PATH; do
- + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
- - case "$ac_dir/" in
- - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- +case $as_dir/ in
- + ./ | .// | /cC/* | \
- + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- + /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- - if test -f $ac_dir/$ac_prog; then
- + for ac_exec_ext in '' $ac_executable_extensions; do
- + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- if test $ac_prog = install &&
- - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- + elif test $ac_prog = install &&
- + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- + # program-specific install script used by HP pwplus--don't use.
- + :
- else
- - ac_cv_path_install="$ac_dir/$ac_prog -c"
- - break 2
- + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- + break 3
- fi
- fi
- done
- - ;;
- - esac
- done
- - IFS="$ac_save_IFS"
- + ;;
- +esac
- +done
- +
-
- fi
- if test "${ac_cv_path_install+set}" = set; then
- - INSTALL="$ac_cv_path_install"
- + INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- - INSTALL="$ac_install_sh"
- + INSTALL=$ac_install_sh
- fi
- fi
- -echo "$ac_t""$INSTALL" 1>&6
- +echo "$as_me:$LINENO: result: $INSTALL" >&5
- +echo "${ECHO_T}$INSTALL" >&6
-
- # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
- # It thinks the first close brace ends the variable substitution.
- test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
- -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
- +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
- test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
- @@ -4525,10 +7787,10 @@
- if test "x$cross_compiling" = "xno"; then
- EXEEXT_FOR_BUILD='$(EXEEXT)'
- else
- - echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
- -echo "configure:4530: checking for build system executable suffix" >&5
- -if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- + echo "$as_me:$LINENO: checking for build system executable suffix" >&5
- +echo $ECHO_N "checking for build system executable suffix... $ECHO_C" >&6
- +if test "${bfd_cv_build_exeext+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.c
- @@ -4543,125 +7805,357 @@
- rm -f conftest*
- test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
- fi
- -
- -echo "$ac_t""$bfd_cv_build_exeext" 1>&6
- +echo "$as_me:$LINENO: result: $bfd_cv_build_exeext" >&5
- +echo "${ECHO_T}$bfd_cv_build_exeext" >&6
- EXEEXT_FOR_BUILD=""
- test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
- fi
-
-
- -for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
- +
- +
- +
- +
- +
- +
- +for ac_header in stddef.h string.h strings.h stdlib.h time.h unistd.h
- do
- -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
- -echo "configure:4558: checking for $ac_hdr" >&5
- -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 4563 "configure"
- -#include "confdefs.h"
- -#include <$ac_hdr>
- -EOF
- -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- -{ (eval echo configure:4568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- -if test -z "$ac_err"; then
- - rm -rf conftest*
- - eval "ac_cv_header_$ac_safe=yes"
- +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
- +if eval "test \"\${$as_ac_Header+set}\" = set"; then
- + echo "$as_me:$LINENO: checking for $ac_header" >&5
- +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
- +if eval "test \"\${$as_ac_Header+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +fi
- +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- +else
- + # Is the header compilable?
- +echo "$as_me:$LINENO: checking $ac_header usability" >&5
- +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +$ac_includes_default
- +#include <$ac_header>
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + ac_header_compiler=yes
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +ac_header_compiler=no
- +fi
- +rm -f conftest.$ac_objext conftest.$ac_ext
- +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- +echo "${ECHO_T}$ac_header_compiler" >&6
- +
- +# Is the header present?
- +echo "$as_me:$LINENO: checking $ac_header presence" >&5
- +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +#include <$ac_header>
- +_ACEOF
- +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- + ac_status=$?
- + grep -v '^ *+' conftest.er1 >conftest.err
- + rm -f conftest.er1
- + cat conftest.err >&5
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } >/dev/null; then
- + if test -s conftest.err; then
- + ac_cpp_err=$ac_c_preproc_warn_flag
- + else
- + ac_cpp_err=
- + fi
- +else
- + ac_cpp_err=yes
- +fi
- +if test -z "$ac_cpp_err"; then
- + ac_header_preproc=yes
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- + ac_header_preproc=no
- +fi
- +rm -f conftest.err conftest.$ac_ext
- +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
- +echo "${ECHO_T}$ac_header_preproc" >&6
- +
- +# So? What about this header?
- +case $ac_header_compiler:$ac_header_preproc in
- + yes:no )
- + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- + (
- + cat <<\_ASBOX
- +## ------------------------------------ ##
- +## Report this to bug-autoconf@gnu.org. ##
- +## ------------------------------------ ##
- +_ASBOX
- + ) |
- + sed "s/^/$as_me: WARNING: /" >&2
- + ;;
- + no:yes )
- + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
- +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- + (
- + cat <<\_ASBOX
- +## ------------------------------------ ##
- +## Report this to bug-autoconf@gnu.org. ##
- +## ------------------------------------ ##
- +_ASBOX
- + ) |
- + sed "s/^/$as_me: WARNING: /" >&2
- + ;;
- +esac
- +echo "$as_me:$LINENO: checking for $ac_header" >&5
- +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
- +if eval "test \"\${$as_ac_Header+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - echo "$ac_err" >&5
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - eval "ac_cv_header_$ac_safe=no"
- + eval "$as_ac_Header=$ac_header_preproc"
- fi
- -rm -f conftest*
- +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- +
- fi
- -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- - echo "$ac_t""yes" 1>&6
- - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- - cat >> confdefs.h <<EOF
- -#define $ac_tr_hdr 1
- -EOF
- +if test `eval echo '${'$as_ac_Header'}'` = yes; then
- + cat >>confdefs.h <<_ACEOF
- +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
- +_ACEOF
-
- -else
- - echo "$ac_t""no" 1>&6
- fi
- +
- done
-
- -for ac_hdr in fcntl.h sys/file.h sys/time.h
- +
- +
- +
- +for ac_header in fcntl.h sys/file.h sys/time.h
- do
- -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
- -echo "configure:4598: checking for $ac_hdr" >&5
- -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 4603 "configure"
- -#include "confdefs.h"
- -#include <$ac_hdr>
- -EOF
- -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- -{ (eval echo configure:4608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- -if test -z "$ac_err"; then
- - rm -rf conftest*
- - eval "ac_cv_header_$ac_safe=yes"
- +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
- +if eval "test \"\${$as_ac_Header+set}\" = set"; then
- + echo "$as_me:$LINENO: checking for $ac_header" >&5
- +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
- +if eval "test \"\${$as_ac_Header+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +fi
- +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- +else
- + # Is the header compilable?
- +echo "$as_me:$LINENO: checking $ac_header usability" >&5
- +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +$ac_includes_default
- +#include <$ac_header>
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + ac_header_compiler=yes
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +ac_header_compiler=no
- +fi
- +rm -f conftest.$ac_objext conftest.$ac_ext
- +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- +echo "${ECHO_T}$ac_header_compiler" >&6
- +
- +# Is the header present?
- +echo "$as_me:$LINENO: checking $ac_header presence" >&5
- +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +#include <$ac_header>
- +_ACEOF
- +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- + ac_status=$?
- + grep -v '^ *+' conftest.er1 >conftest.err
- + rm -f conftest.er1
- + cat conftest.err >&5
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } >/dev/null; then
- + if test -s conftest.err; then
- + ac_cpp_err=$ac_c_preproc_warn_flag
- + else
- + ac_cpp_err=
- + fi
- +else
- + ac_cpp_err=yes
- +fi
- +if test -z "$ac_cpp_err"; then
- + ac_header_preproc=yes
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- + ac_header_preproc=no
- +fi
- +rm -f conftest.err conftest.$ac_ext
- +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
- +echo "${ECHO_T}$ac_header_preproc" >&6
- +
- +# So? What about this header?
- +case $ac_header_compiler:$ac_header_preproc in
- + yes:no )
- + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- + (
- + cat <<\_ASBOX
- +## ------------------------------------ ##
- +## Report this to bug-autoconf@gnu.org. ##
- +## ------------------------------------ ##
- +_ASBOX
- + ) |
- + sed "s/^/$as_me: WARNING: /" >&2
- + ;;
- + no:yes )
- + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
- +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- + (
- + cat <<\_ASBOX
- +## ------------------------------------ ##
- +## Report this to bug-autoconf@gnu.org. ##
- +## ------------------------------------ ##
- +_ASBOX
- + ) |
- + sed "s/^/$as_me: WARNING: /" >&2
- + ;;
- +esac
- +echo "$as_me:$LINENO: checking for $ac_header" >&5
- +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
- +if eval "test \"\${$as_ac_Header+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - echo "$ac_err" >&5
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - eval "ac_cv_header_$ac_safe=no"
- + eval "$as_ac_Header=$ac_header_preproc"
- fi
- -rm -f conftest*
- +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- +
- fi
- -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- - echo "$ac_t""yes" 1>&6
- - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- - cat >> confdefs.h <<EOF
- -#define $ac_tr_hdr 1
- -EOF
- +if test `eval echo '${'$as_ac_Header'}'` = yes; then
- + cat >>confdefs.h <<_ACEOF
- +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
- +_ACEOF
-
- -else
- - echo "$ac_t""no" 1>&6
- fi
- +
- done
-
- -echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
- -echo "configure:4635: checking whether time.h and sys/time.h may both be included" >&5
- -if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 4640 "configure"
- -#include "confdefs.h"
- +echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
- +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
- +if test "${ac_cv_header_time+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- #include <sys/types.h>
- #include <sys/time.h>
- #include <time.h>
- -int main() {
- -struct tm *tp;
- -; return 0; }
- -EOF
- -if { (eval echo configure:4649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- +
- +int
- +main ()
- +{
- +if ((struct tm *) 0)
- +return 0;
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- ac_cv_header_time=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - ac_cv_header_time=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +ac_cv_header_time=no
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
- -
- -echo "$ac_t""$ac_cv_header_time" 1>&6
- +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
- +echo "${ECHO_T}$ac_cv_header_time" >&6
- if test $ac_cv_header_time = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define TIME_WITH_SYS_TIME 1
- -EOF
- +_ACEOF
-
- fi
-
- @@ -4665,45 +8159,69 @@
-
- fi
-
- +
- +
- +
- +
- +
- ac_header_dirent=no
- -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
- -do
- -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- -echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
- -echo "configure:4674: checking for $ac_hdr that defines DIR" >&5
- -if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 4679 "configure"
- -#include "confdefs.h"
- +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
- + as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
- +echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
- +echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
- +if eval "test \"\${$as_ac_Header+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- #include <sys/types.h>
- #include <$ac_hdr>
- -int main() {
- -DIR *dirp = 0;
- -; return 0; }
- -EOF
- -if { (eval echo configure:4687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- - eval "ac_cv_header_dirent_$ac_safe=yes"
- -else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - eval "ac_cv_header_dirent_$ac_safe=no"
- -fi
- -rm -f conftest*
- -fi
- -if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
- - echo "$ac_t""yes" 1>&6
- - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- - cat >> confdefs.h <<EOF
- -#define $ac_tr_hdr 1
- -EOF
- - ac_header_dirent=$ac_hdr; break
- -else
- - echo "$ac_t""no" 1>&6
- +
- +int
- +main ()
- +{
- +if ((DIR *) 0)
- +return 0;
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + eval "$as_ac_Header=yes"
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +eval "$as_ac_Header=no"
- +fi
- +rm -f conftest.$ac_objext conftest.$ac_ext
- +fi
- +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- +if test `eval echo '${'$as_ac_Header'}'` = yes; then
- + cat >>confdefs.h <<_ACEOF
- +#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
- +_ACEOF
- +
- +ac_header_dirent=$ac_hdr; break
- fi
- +
- done
- # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
- if test $ac_header_dirent = dirent.h; then
- @@ -4707,85 +8225,217 @@
- done
- # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
- if test $ac_header_dirent = dirent.h; then
- -echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
- -echo "configure:4712: checking for opendir in -ldir" >&5
- -ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
- -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - ac_save_LIBS="$LIBS"
- -LIBS="-ldir $LIBS"
- -cat > conftest.$ac_ext <<EOF
- -#line 4720 "configure"
- -#include "confdefs.h"
- + echo "$as_me:$LINENO: checking for library containing opendir" >&5
- +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
- +if test "${ac_cv_search_opendir+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + ac_func_search_save_LIBS=$LIBS
- +ac_cv_search_opendir=no
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +
- /* Override any gcc2 internal prototype to avoid an error. */
- +#ifdef __cplusplus
- +extern "C"
- +#endif
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- -char opendir();
- +char opendir ();
- +int
- +main ()
- +{
- +opendir ();
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + ac_cv_search_opendir="none required"
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +fi
- +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- +if test "$ac_cv_search_opendir" = no; then
- + for ac_lib in dir; do
- + LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- -int main() {
- -opendir()
- -; return 0; }
- -EOF
- -if { (eval echo configure:4731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- - rm -rf conftest*
- - eval "ac_cv_lib_$ac_lib_var=yes"
- +/* Override any gcc2 internal prototype to avoid an error. */
- +#ifdef __cplusplus
- +extern "C"
- +#endif
- +/* We use char because int might match the return type of a gcc2
- + builtin and then its argument prototype would still apply. */
- +char opendir ();
- +int
- +main ()
- +{
- +opendir ();
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + ac_cv_search_opendir="-l$ac_lib"
- +break
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - eval "ac_cv_lib_$ac_lib_var=no"
- -fi
- -rm -f conftest*
- -LIBS="$ac_save_LIBS"
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
-
- fi
- -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- - echo "$ac_t""yes" 1>&6
- - LIBS="$LIBS -ldir"
- -else
- - echo "$ac_t""no" 1>&6
- +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- + done
- +fi
- +LIBS=$ac_func_search_save_LIBS
- +fi
- +echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
- +echo "${ECHO_T}$ac_cv_search_opendir" >&6
- +if test "$ac_cv_search_opendir" != no; then
- + test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
- +
- fi
-
- else
- -echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
- -echo "configure:4753: checking for opendir in -lx" >&5
- -ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
- -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - ac_save_LIBS="$LIBS"
- -LIBS="-lx $LIBS"
- -cat > conftest.$ac_ext <<EOF
- -#line 4761 "configure"
- -#include "confdefs.h"
- + echo "$as_me:$LINENO: checking for library containing opendir" >&5
- +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
- +if test "${ac_cv_search_opendir+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + ac_func_search_save_LIBS=$LIBS
- +ac_cv_search_opendir=no
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +
- /* Override any gcc2 internal prototype to avoid an error. */
- +#ifdef __cplusplus
- +extern "C"
- +#endif
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- -char opendir();
- +char opendir ();
- +int
- +main ()
- +{
- +opendir ();
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + ac_cv_search_opendir="none required"
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +fi
- +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- +if test "$ac_cv_search_opendir" = no; then
- + for ac_lib in x; do
- + LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- -int main() {
- -opendir()
- -; return 0; }
- -EOF
- -if { (eval echo configure:4772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- - rm -rf conftest*
- - eval "ac_cv_lib_$ac_lib_var=yes"
- +/* Override any gcc2 internal prototype to avoid an error. */
- +#ifdef __cplusplus
- +extern "C"
- +#endif
- +/* We use char because int might match the return type of a gcc2
- + builtin and then its argument prototype would still apply. */
- +char opendir ();
- +int
- +main ()
- +{
- +opendir ();
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + ac_cv_search_opendir="-l$ac_lib"
- +break
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - eval "ac_cv_lib_$ac_lib_var=no"
- -fi
- -rm -f conftest*
- -LIBS="$ac_save_LIBS"
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
-
- fi
- -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- - echo "$ac_t""yes" 1>&6
- - LIBS="$LIBS -lx"
- -else
- - echo "$ac_t""no" 1>&6
- +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- + done
- +fi
- +LIBS=$ac_func_search_save_LIBS
- +fi
- +echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
- +echo "${ECHO_T}$ac_cv_search_opendir" >&6
- +if test "$ac_cv_search_opendir" != no; then
- + test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
- +
- fi
-
- fi
- @@ -4790,58 +8440,93 @@
-
- fi
-
- +
- +
- +
- +
- +
- +
- +
- for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid
- do
- -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- -echo "configure:4797: checking for $ac_func" >&5
- -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 4802 "configure"
- -#include "confdefs.h"
- +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
- +echo "$as_me:$LINENO: checking for $ac_func" >&5
- +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
- +if eval "test \"\${$as_ac_var+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- /* System header to define __stub macros and hopefully few prototypes,
- - which can conflict with char $ac_func(); below. */
- -#include <assert.h>
- + which can conflict with char $ac_func (); below.
- + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- + <limits.h> exists even on freestanding compilers. */
- +#ifdef __STDC__
- +# include <limits.h>
- +#else
- +# include <assert.h>
- +#endif
- /* Override any gcc2 internal prototype to avoid an error. */
- +#ifdef __cplusplus
- +extern "C"
- +{
- +#endif
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- -char $ac_func();
- -
- -int main() {
- -
- +char $ac_func ();
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- -$ac_func();
- +char (*f) () = $ac_func;
- +#endif
- +#ifdef __cplusplus
- +}
- #endif
-
- -; return 0; }
- -EOF
- -if { (eval echo configure:4825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- - rm -rf conftest*
- - eval "ac_cv_func_$ac_func=yes"
- -else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - eval "ac_cv_func_$ac_func=no"
- -fi
- -rm -f conftest*
- -fi
- -
- -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- - echo "$ac_t""yes" 1>&6
- - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- - cat >> confdefs.h <<EOF
- -#define $ac_tr_func 1
- -EOF
- +int
- +main ()
- +{
- +return f != $ac_func;
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + eval "$as_ac_var=yes"
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +eval "$as_ac_var=no"
- +fi
- +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- +fi
- +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
- +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
- +if test `eval echo '${'$as_ac_var'}'` = yes; then
- + cat >>confdefs.h <<_ACEOF
- +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
- +_ACEOF
-
- -else
- - echo "$ac_t""no" 1>&6
- fi
- done
-
- @@ -4849,20 +8534,25 @@
-
- case "${host}" in
- *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define USE_BINARY_FOPEN 1
- -EOF
- +_ACEOF
- ;;
- esac
-
- -echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
- -echo "configure:4860: checking whether strstr must be declared" >&5
- -if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 4865 "configure"
- -#include "confdefs.h"
- +echo "$as_me:$LINENO: checking whether strstr must be declared" >&5
- +echo $ECHO_N "checking whether strstr must be declared... $ECHO_C" >&6
- +if test "${bfd_cv_decl_needed_strstr+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- #include <stdio.h>
- #ifdef HAVE_STRING_H
- @@ -4878,38 +8568,58 @@
- #ifdef HAVE_UNISTD_H
- #include <unistd.h>
- #endif
- -int main() {
- +int
- +main ()
- +{
- char *(*pfn) = (char *(*)) strstr
- -; return 0; }
- -EOF
- -if { (eval echo configure:4886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- bfd_cv_decl_needed_strstr=no
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - bfd_cv_decl_needed_strstr=yes
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +bfd_cv_decl_needed_strstr=yes
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
-
- -echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
- +echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_strstr" >&5
- +echo "${ECHO_T}$bfd_cv_decl_needed_strstr" >&6
- if test $bfd_cv_decl_needed_strstr = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define NEED_DECLARATION_STRSTR 1
- -EOF
- +_ACEOF
-
- fi
-
- -echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
- -echo "configure:4907: checking whether malloc must be declared" >&5
- -if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 4912 "configure"
- -#include "confdefs.h"
- +echo "$as_me:$LINENO: checking whether malloc must be declared" >&5
- +echo $ECHO_N "checking whether malloc must be declared... $ECHO_C" >&6
- +if test "${bfd_cv_decl_needed_malloc+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- #include <stdio.h>
- #ifdef HAVE_STRING_H
- @@ -4925,38 +8635,58 @@
- #ifdef HAVE_UNISTD_H
- #include <unistd.h>
- #endif
- -int main() {
- +int
- +main ()
- +{
- char *(*pfn) = (char *(*)) malloc
- -; return 0; }
- -EOF
- -if { (eval echo configure:4933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- bfd_cv_decl_needed_malloc=no
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - bfd_cv_decl_needed_malloc=yes
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +bfd_cv_decl_needed_malloc=yes
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
-
- -echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
- +echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_malloc" >&5
- +echo "${ECHO_T}$bfd_cv_decl_needed_malloc" >&6
- if test $bfd_cv_decl_needed_malloc = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define NEED_DECLARATION_MALLOC 1
- -EOF
- +_ACEOF
-
- fi
-
- -echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
- -echo "configure:4954: checking whether realloc must be declared" >&5
- -if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 4959 "configure"
- -#include "confdefs.h"
- +echo "$as_me:$LINENO: checking whether realloc must be declared" >&5
- +echo $ECHO_N "checking whether realloc must be declared... $ECHO_C" >&6
- +if test "${bfd_cv_decl_needed_realloc+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- #include <stdio.h>
- #ifdef HAVE_STRING_H
- @@ -4972,38 +8702,58 @@
- #ifdef HAVE_UNISTD_H
- #include <unistd.h>
- #endif
- -int main() {
- +int
- +main ()
- +{
- char *(*pfn) = (char *(*)) realloc
- -; return 0; }
- -EOF
- -if { (eval echo configure:4980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- bfd_cv_decl_needed_realloc=no
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - bfd_cv_decl_needed_realloc=yes
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +bfd_cv_decl_needed_realloc=yes
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
-
- -echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
- +echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_realloc" >&5
- +echo "${ECHO_T}$bfd_cv_decl_needed_realloc" >&6
- if test $bfd_cv_decl_needed_realloc = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define NEED_DECLARATION_REALLOC 1
- -EOF
- +_ACEOF
-
- fi
-
- -echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
- -echo "configure:5001: checking whether free must be declared" >&5
- -if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 5006 "configure"
- -#include "confdefs.h"
- +echo "$as_me:$LINENO: checking whether free must be declared" >&5
- +echo $ECHO_N "checking whether free must be declared... $ECHO_C" >&6
- +if test "${bfd_cv_decl_needed_free+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- #include <stdio.h>
- #ifdef HAVE_STRING_H
- @@ -5019,38 +8769,58 @@
- #ifdef HAVE_UNISTD_H
- #include <unistd.h>
- #endif
- -int main() {
- +int
- +main ()
- +{
- char *(*pfn) = (char *(*)) free
- -; return 0; }
- -EOF
- -if { (eval echo configure:5027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- bfd_cv_decl_needed_free=no
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - bfd_cv_decl_needed_free=yes
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +bfd_cv_decl_needed_free=yes
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
-
- -echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
- +echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_free" >&5
- +echo "${ECHO_T}$bfd_cv_decl_needed_free" >&6
- if test $bfd_cv_decl_needed_free = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define NEED_DECLARATION_FREE 1
- -EOF
- +_ACEOF
-
- fi
-
- -echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
- -echo "configure:5048: checking whether getenv must be declared" >&5
- -if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 5053 "configure"
- -#include "confdefs.h"
- +echo "$as_me:$LINENO: checking whether getenv must be declared" >&5
- +echo $ECHO_N "checking whether getenv must be declared... $ECHO_C" >&6
- +if test "${bfd_cv_decl_needed_getenv+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- #include <stdio.h>
- #ifdef HAVE_STRING_H
- @@ -5066,27 +8836,43 @@
- #ifdef HAVE_UNISTD_H
- #include <unistd.h>
- #endif
- -int main() {
- +int
- +main ()
- +{
- char *(*pfn) = (char *(*)) getenv
- -; return 0; }
- -EOF
- -if { (eval echo configure:5074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- bfd_cv_decl_needed_getenv=no
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - bfd_cv_decl_needed_getenv=yes
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +bfd_cv_decl_needed_getenv=yes
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
-
- -echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
- +echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_getenv" >&5
- +echo "${ECHO_T}$bfd_cv_decl_needed_getenv" >&6
- if test $bfd_cv_decl_needed_getenv = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define NEED_DECLARATION_GETENV 1
- -EOF
- +_ACEOF
-
- fi
-
- @@ -5256,30 +9042,51 @@
- COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE"
- # Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
- # have c_impl as a member of struct core_dumpx
- - echo $ac_n "checking for c_impl in struct core_dumpx""... $ac_c" 1>&6
- -echo "configure:5261: checking for c_impl in struct core_dumpx" >&5
- - cat > conftest.$ac_ext <<EOF
- -#line 5263 "configure"
- -#include "confdefs.h"
- + echo "$as_me:$LINENO: checking for c_impl in struct core_dumpx" >&5
- +echo $ECHO_N "checking for c_impl in struct core_dumpx... $ECHO_C" >&6
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- #include <core.h>
- -int main() {
- +int
- +main ()
- +{
- struct core_dumpx c; c.c_impl = 0;
- -; return 0; }
- -EOF
- -if { (eval echo configure:5270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- - cat >> confdefs.h <<\EOF
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- +
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_ST_C_IMPL 1
- -EOF
- +_ACEOF
-
- - echo "$ac_t""yes" 1>&6
- + echo "$as_me:$LINENO: result: yes" >&5
- +echo "${ECHO_T}yes" >&6
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - echo "$ac_t""no" 1>&6
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- ;;
- rs6000-*-aix4*) COREFILE=rs6000-core.lo ;;
- rs6000-*-*) COREFILE=rs6000-core.lo ;;
- @@ -5330,44 +9137,146 @@
-
- # ELF corefile support has several flavors, but all of
- # them use something called <sys/procfs.h>
- - for ac_hdr in sys/procfs.h
- +
- +for ac_header in sys/procfs.h
- do
- -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
- -echo "configure:5338: checking for $ac_hdr" >&5
- -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 5343 "configure"
- -#include "confdefs.h"
- -#include <$ac_hdr>
- -EOF
- -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- -{ (eval echo configure:5348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- -if test -z "$ac_err"; then
- - rm -rf conftest*
- - eval "ac_cv_header_$ac_safe=yes"
- +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
- +if eval "test \"\${$as_ac_Header+set}\" = set"; then
- + echo "$as_me:$LINENO: checking for $ac_header" >&5
- +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
- +if eval "test \"\${$as_ac_Header+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +fi
- +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- +else
- + # Is the header compilable?
- +echo "$as_me:$LINENO: checking $ac_header usability" >&5
- +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +$ac_includes_default
- +#include <$ac_header>
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + ac_header_compiler=yes
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +ac_header_compiler=no
- +fi
- +rm -f conftest.$ac_objext conftest.$ac_ext
- +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- +echo "${ECHO_T}$ac_header_compiler" >&6
- +
- +# Is the header present?
- +echo "$as_me:$LINENO: checking $ac_header presence" >&5
- +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +#include <$ac_header>
- +_ACEOF
- +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- + ac_status=$?
- + grep -v '^ *+' conftest.er1 >conftest.err
- + rm -f conftest.er1
- + cat conftest.err >&5
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } >/dev/null; then
- + if test -s conftest.err; then
- + ac_cpp_err=$ac_c_preproc_warn_flag
- + else
- + ac_cpp_err=
- + fi
- +else
- + ac_cpp_err=yes
- +fi
- +if test -z "$ac_cpp_err"; then
- + ac_header_preproc=yes
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- + ac_header_preproc=no
- +fi
- +rm -f conftest.err conftest.$ac_ext
- +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
- +echo "${ECHO_T}$ac_header_preproc" >&6
- +
- +# So? What about this header?
- +case $ac_header_compiler:$ac_header_preproc in
- + yes:no )
- + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- + (
- + cat <<\_ASBOX
- +## ------------------------------------ ##
- +## Report this to bug-autoconf@gnu.org. ##
- +## ------------------------------------ ##
- +_ASBOX
- + ) |
- + sed "s/^/$as_me: WARNING: /" >&2
- + ;;
- + no:yes )
- + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
- +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- + (
- + cat <<\_ASBOX
- +## ------------------------------------ ##
- +## Report this to bug-autoconf@gnu.org. ##
- +## ------------------------------------ ##
- +_ASBOX
- + ) |
- + sed "s/^/$as_me: WARNING: /" >&2
- + ;;
- +esac
- +echo "$as_me:$LINENO: checking for $ac_header" >&5
- +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
- +if eval "test \"\${$as_ac_Header+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - echo "$ac_err" >&5
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - eval "ac_cv_header_$ac_safe=no"
- + eval "$as_ac_Header=$ac_header_preproc"
- fi
- -rm -f conftest*
- +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- +
- fi
- -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- - echo "$ac_t""yes" 1>&6
- - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- - cat >> confdefs.h <<EOF
- -#define $ac_tr_hdr 1
- -EOF
- +if test `eval echo '${'$as_ac_Header'}'` = yes; then
- + cat >>confdefs.h <<_ACEOF
- +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
- +_ACEOF
-
- -else
- - echo "$ac_t""no" 1>&6
- fi
- +
- done
-
- if test "$ac_cv_header_sys_procfs_h" = yes; then
- @@ -5371,590 +9280,911 @@
- done
-
- if test "$ac_cv_header_sys_procfs_h" = yes; then
- - echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6
- -echo "configure:5376: checking for prstatus_t in sys/procfs.h" >&5
- - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 5381 "configure"
- -#include "confdefs.h"
- + echo "$as_me:$LINENO: checking for prstatus_t in sys/procfs.h" >&5
- +echo $ECHO_N "checking for prstatus_t in sys/procfs.h... $ECHO_C" >&6
- + if test "${bfd_cv_have_sys_procfs_type_prstatus_t+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- #define _SYSCALL32
- #include <sys/procfs.h>
- -int main() {
- +int
- +main ()
- +{
- prstatus_t avar
- -; return 0; }
- -EOF
- -if { (eval echo configure:5390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- bfd_cv_have_sys_procfs_type_prstatus_t=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - bfd_cv_have_sys_procfs_type_prstatus_t=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +bfd_cv_have_sys_procfs_type_prstatus_t=no
-
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
-
- if test $bfd_cv_have_sys_procfs_type_prstatus_t = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_PRSTATUS_T 1
- -EOF
- +_ACEOF
-
- fi
- - echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6
- + echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prstatus_t" >&5
- +echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prstatus_t" >&6
-
- - echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6
- -echo "configure:5412: checking for prstatus32_t in sys/procfs.h" >&5
- - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus32_t'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 5417 "configure"
- -#include "confdefs.h"
- + echo "$as_me:$LINENO: checking for prstatus32_t in sys/procfs.h" >&5
- +echo $ECHO_N "checking for prstatus32_t in sys/procfs.h... $ECHO_C" >&6
- + if test "${bfd_cv_have_sys_procfs_type_prstatus32_t+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- #define _SYSCALL32
- #include <sys/procfs.h>
- -int main() {
- +int
- +main ()
- +{
- prstatus32_t avar
- -; return 0; }
- -EOF
- -if { (eval echo configure:5426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- bfd_cv_have_sys_procfs_type_prstatus32_t=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - bfd_cv_have_sys_procfs_type_prstatus32_t=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +bfd_cv_have_sys_procfs_type_prstatus32_t=no
-
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
-
- if test $bfd_cv_have_sys_procfs_type_prstatus32_t = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_PRSTATUS32_T 1
- -EOF
- +_ACEOF
-
- fi
- - echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus32_t" 1>&6
- + echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prstatus32_t" >&5
- +echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prstatus32_t" >&6
-
- - echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
- -echo "configure:5448: checking for prstatus_t.pr_who in sys/procfs.h" >&5
- - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 5453 "configure"
- -#include "confdefs.h"
- + echo "$as_me:$LINENO: checking for prstatus_t.pr_who in sys/procfs.h" >&5
- +echo $ECHO_N "checking for prstatus_t.pr_who in sys/procfs.h... $ECHO_C" >&6
- + if test "${bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- #define _SYSCALL32
- #include <sys/procfs.h>
- -int main() {
- +int
- +main ()
- +{
- prstatus_t avar; void* aref = (void*) &avar.pr_who
- -; return 0; }
- -EOF
- -if { (eval echo configure:5462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=no
-
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
-
- if test $bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_PRSTATUS_T_PR_WHO 1
- -EOF
- +_ACEOF
-
- fi
- - echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6
- + echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" >&5
- +echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" >&6
-
- - echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
- -echo "configure:5484: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
- - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 5489 "configure"
- -#include "confdefs.h"
- + echo "$as_me:$LINENO: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
- +echo $ECHO_N "checking for prstatus32_t.pr_who in sys/procfs.h... $ECHO_C" >&6
- + if test "${bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- #define _SYSCALL32
- #include <sys/procfs.h>
- -int main() {
- +int
- +main ()
- +{
- prstatus32_t avar; void* aref = (void*) &avar.pr_who
- -; return 0; }
- -EOF
- -if { (eval echo configure:5498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=no
-
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
-
- if test $bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_PRSTATUS32_T_PR_WHO 1
- -EOF
- +_ACEOF
-
- fi
- - echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" 1>&6
- + echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" >&5
- +echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" >&6
-
- - echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
- -echo "configure:5520: checking for pstatus_t in sys/procfs.h" >&5
- - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 5525 "configure"
- -#include "confdefs.h"
- + echo "$as_me:$LINENO: checking for pstatus_t in sys/procfs.h" >&5
- +echo $ECHO_N "checking for pstatus_t in sys/procfs.h... $ECHO_C" >&6
- + if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- #define _SYSCALL32
- #include <sys/procfs.h>
- -int main() {
- +int
- +main ()
- +{
- pstatus_t avar
- -; return 0; }
- -EOF
- -if { (eval echo configure:5534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- bfd_cv_have_sys_procfs_type_pstatus_t=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - bfd_cv_have_sys_procfs_type_pstatus_t=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +bfd_cv_have_sys_procfs_type_pstatus_t=no
-
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
-
- if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_PSTATUS_T 1
- -EOF
- +_ACEOF
-
- fi
- - echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
- + echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
- +echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pstatus_t" >&6
-
- - echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6
- -echo "configure:5556: checking for pxstatus_t in sys/procfs.h" >&5
- - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pxstatus_t'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 5561 "configure"
- -#include "confdefs.h"
- + echo "$as_me:$LINENO: checking for pxstatus_t in sys/procfs.h" >&5
- +echo $ECHO_N "checking for pxstatus_t in sys/procfs.h... $ECHO_C" >&6
- + if test "${bfd_cv_have_sys_procfs_type_pxstatus_t+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- #define _SYSCALL32
- #include <sys/procfs.h>
- -int main() {
- +int
- +main ()
- +{
- pxstatus_t avar
- -; return 0; }
- -EOF
- -if { (eval echo configure:5570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- bfd_cv_have_sys_procfs_type_pxstatus_t=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - bfd_cv_have_sys_procfs_type_pxstatus_t=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +bfd_cv_have_sys_procfs_type_pxstatus_t=no
-
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
-
- if test $bfd_cv_have_sys_procfs_type_pxstatus_t = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_PXSTATUS_T 1
- -EOF
- +_ACEOF
-
- fi
- - echo "$ac_t""$bfd_cv_have_sys_procfs_type_pxstatus_t" 1>&6
- + echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pxstatus_t" >&5
- +echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pxstatus_t" >&6
-
- - echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6
- -echo "configure:5592: checking for pstatus32_t in sys/procfs.h" >&5
- - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus32_t'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 5597 "configure"
- -#include "confdefs.h"
- + echo "$as_me:$LINENO: checking for pstatus32_t in sys/procfs.h" >&5
- +echo $ECHO_N "checking for pstatus32_t in sys/procfs.h... $ECHO_C" >&6
- + if test "${bfd_cv_have_sys_procfs_type_pstatus32_t+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- #define _SYSCALL32
- #include <sys/procfs.h>
- -int main() {
- +int
- +main ()
- +{
- pstatus32_t avar
- -; return 0; }
- -EOF
- -if { (eval echo configure:5606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- bfd_cv_have_sys_procfs_type_pstatus32_t=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - bfd_cv_have_sys_procfs_type_pstatus32_t=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +bfd_cv_have_sys_procfs_type_pstatus32_t=no
-
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
-
- if test $bfd_cv_have_sys_procfs_type_pstatus32_t = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_PSTATUS32_T 1
- -EOF
- +_ACEOF
-
- fi
- - echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus32_t" 1>&6
- + echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pstatus32_t" >&5
- +echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pstatus32_t" >&6
-
- - echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6
- -echo "configure:5628: checking for prpsinfo_t in sys/procfs.h" >&5
- - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 5633 "configure"
- -#include "confdefs.h"
- + echo "$as_me:$LINENO: checking for prpsinfo_t in sys/procfs.h" >&5
- +echo $ECHO_N "checking for prpsinfo_t in sys/procfs.h... $ECHO_C" >&6
- + if test "${bfd_cv_have_sys_procfs_type_prpsinfo_t+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- #define _SYSCALL32
- #include <sys/procfs.h>
- -int main() {
- +int
- +main ()
- +{
- prpsinfo_t avar
- -; return 0; }
- -EOF
- -if { (eval echo configure:5642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - bfd_cv_have_sys_procfs_type_prpsinfo_t=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +bfd_cv_have_sys_procfs_type_prpsinfo_t=no
-
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
-
- if test $bfd_cv_have_sys_procfs_type_prpsinfo_t = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_PRPSINFO_T 1
- -EOF
- +_ACEOF
-
- fi
- - echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6
- + echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prpsinfo_t" >&5
- +echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prpsinfo_t" >&6
-
- - echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6
- -echo "configure:5664: checking for prpsinfo32_t in sys/procfs.h" >&5
- - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo32_t'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 5669 "configure"
- -#include "confdefs.h"
- + echo "$as_me:$LINENO: checking for prpsinfo32_t in sys/procfs.h" >&5
- +echo $ECHO_N "checking for prpsinfo32_t in sys/procfs.h... $ECHO_C" >&6
- + if test "${bfd_cv_have_sys_procfs_type_prpsinfo32_t+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- #define _SYSCALL32
- #include <sys/procfs.h>
- -int main() {
- +int
- +main ()
- +{
- prpsinfo32_t avar
- -; return 0; }
- -EOF
- -if { (eval echo configure:5678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - bfd_cv_have_sys_procfs_type_prpsinfo32_t=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +bfd_cv_have_sys_procfs_type_prpsinfo32_t=no
-
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
-
- if test $bfd_cv_have_sys_procfs_type_prpsinfo32_t = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_PRPSINFO32_T 1
- -EOF
- +_ACEOF
-
- fi
- - echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo32_t" 1>&6
- + echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prpsinfo32_t" >&5
- +echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prpsinfo32_t" >&6
-
- - echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6
- -echo "configure:5700: checking for psinfo_t in sys/procfs.h" >&5
- - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 5705 "configure"
- -#include "confdefs.h"
- + echo "$as_me:$LINENO: checking for psinfo_t in sys/procfs.h" >&5
- +echo $ECHO_N "checking for psinfo_t in sys/procfs.h... $ECHO_C" >&6
- + if test "${bfd_cv_have_sys_procfs_type_psinfo_t+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- #define _SYSCALL32
- #include <sys/procfs.h>
- -int main() {
- +int
- +main ()
- +{
- psinfo_t avar
- -; return 0; }
- -EOF
- -if { (eval echo configure:5714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- bfd_cv_have_sys_procfs_type_psinfo_t=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - bfd_cv_have_sys_procfs_type_psinfo_t=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +bfd_cv_have_sys_procfs_type_psinfo_t=no
-
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
-
- if test $bfd_cv_have_sys_procfs_type_psinfo_t = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_PSINFO_T 1
- -EOF
- +_ACEOF
-
- fi
- - echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6
- + echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_psinfo_t" >&5
- +echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_psinfo_t" >&6
-
- - echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6
- -echo "configure:5736: checking for psinfo32_t in sys/procfs.h" >&5
- - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo32_t'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 5741 "configure"
- -#include "confdefs.h"
- + echo "$as_me:$LINENO: checking for psinfo32_t in sys/procfs.h" >&5
- +echo $ECHO_N "checking for psinfo32_t in sys/procfs.h... $ECHO_C" >&6
- + if test "${bfd_cv_have_sys_procfs_type_psinfo32_t+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- #define _SYSCALL32
- #include <sys/procfs.h>
- -int main() {
- +int
- +main ()
- +{
- psinfo32_t avar
- -; return 0; }
- -EOF
- -if { (eval echo configure:5750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- bfd_cv_have_sys_procfs_type_psinfo32_t=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - bfd_cv_have_sys_procfs_type_psinfo32_t=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +bfd_cv_have_sys_procfs_type_psinfo32_t=no
-
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
-
- if test $bfd_cv_have_sys_procfs_type_psinfo32_t = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_PSINFO32_T 1
- -EOF
- +_ACEOF
-
- fi
- - echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo32_t" 1>&6
- + echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_psinfo32_t" >&5
- +echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_psinfo32_t" >&6
-
- - echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6
- -echo "configure:5772: checking for lwpstatus_t in sys/procfs.h" >&5
- - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 5777 "configure"
- -#include "confdefs.h"
- + echo "$as_me:$LINENO: checking for lwpstatus_t in sys/procfs.h" >&5
- +echo $ECHO_N "checking for lwpstatus_t in sys/procfs.h... $ECHO_C" >&6
- + if test "${bfd_cv_have_sys_procfs_type_lwpstatus_t+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- #define _SYSCALL32
- #include <sys/procfs.h>
- -int main() {
- +int
- +main ()
- +{
- lwpstatus_t avar
- -; return 0; }
- -EOF
- -if { (eval echo configure:5786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - bfd_cv_have_sys_procfs_type_lwpstatus_t=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +bfd_cv_have_sys_procfs_type_lwpstatus_t=no
-
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
-
- if test $bfd_cv_have_sys_procfs_type_lwpstatus_t = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_LWPSTATUS_T 1
- -EOF
- +_ACEOF
-
- fi
- - echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6
- + echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_lwpstatus_t" >&5
- +echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_lwpstatus_t" >&6
-
- - echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6
- -echo "configure:5808: checking for lwpxstatus_t in sys/procfs.h" >&5
- - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpxstatus_t'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 5813 "configure"
- -#include "confdefs.h"
- + echo "$as_me:$LINENO: checking for lwpxstatus_t in sys/procfs.h" >&5
- +echo $ECHO_N "checking for lwpxstatus_t in sys/procfs.h... $ECHO_C" >&6
- + if test "${bfd_cv_have_sys_procfs_type_lwpxstatus_t+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- #define _SYSCALL32
- #include <sys/procfs.h>
- -int main() {
- +int
- +main ()
- +{
- lwpxstatus_t avar
- -; return 0; }
- -EOF
- -if { (eval echo configure:5822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - bfd_cv_have_sys_procfs_type_lwpxstatus_t=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +bfd_cv_have_sys_procfs_type_lwpxstatus_t=no
-
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
-
- if test $bfd_cv_have_sys_procfs_type_lwpxstatus_t = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_LWPXSTATUS_T 1
- -EOF
- +_ACEOF
-
- fi
- - echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpxstatus_t" 1>&6
- + echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_lwpxstatus_t" >&5
- +echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_lwpxstatus_t" >&6
-
- - echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6
- -echo "configure:5844: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
- - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 5849 "configure"
- -#include "confdefs.h"
- + echo "$as_me:$LINENO: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
- +echo $ECHO_N "checking for lwpstatus_t.pr_context in sys/procfs.h... $ECHO_C" >&6
- + if test "${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- #define _SYSCALL32
- #include <sys/procfs.h>
- -int main() {
- +int
- +main ()
- +{
- lwpstatus_t avar; void* aref = (void*) &avar.pr_context
- -; return 0; }
- -EOF
- -if { (eval echo configure:5858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=no
-
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
-
- if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_LWPSTATUS_T_PR_CONTEXT 1
- -EOF
- +_ACEOF
-
- fi
- - echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6
- + echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" >&5
- +echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" >&6
-
- - echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6
- -echo "configure:5880: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
- - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 5885 "configure"
- -#include "confdefs.h"
- + echo "$as_me:$LINENO: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
- +echo $ECHO_N "checking for lwpstatus_t.pr_reg in sys/procfs.h... $ECHO_C" >&6
- + if test "${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- #define _SYSCALL32
- #include <sys/procfs.h>
- -int main() {
- +int
- +main ()
- +{
- lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
- -; return 0; }
- -EOF
- -if { (eval echo configure:5894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=no
-
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
-
- if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_LWPSTATUS_T_PR_REG 1
- -EOF
- +_ACEOF
-
- fi
- - echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6
- + echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" >&5
- +echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" >&6
-
- - echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6
- -echo "configure:5916: checking for win32_pstatus_t in sys/procfs.h" >&5
- - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 5921 "configure"
- -#include "confdefs.h"
- + echo "$as_me:$LINENO: checking for win32_pstatus_t in sys/procfs.h" >&5
- +echo $ECHO_N "checking for win32_pstatus_t in sys/procfs.h... $ECHO_C" >&6
- + if test "${bfd_cv_have_sys_procfs_type_win32_pstatus_t+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
-
- #define _SYSCALL32
- #include <sys/procfs.h>
- -int main() {
- +int
- +main ()
- +{
- win32_pstatus_t avar
- -; return 0; }
- -EOF
- -if { (eval echo configure:5930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- - rm -rf conftest*
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - bfd_cv_have_sys_procfs_type_win32_pstatus_t=no
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +bfd_cv_have_sys_procfs_type_win32_pstatus_t=no
-
- fi
- -rm -f conftest*
- +rm -f conftest.$ac_objext conftest.$ac_ext
- fi
-
- if test $bfd_cv_have_sys_procfs_type_win32_pstatus_t = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_WIN32_PSTATUS_T 1
- -EOF
- +_ACEOF
-
- fi
- - echo "$ac_t""$bfd_cv_have_sys_procfs_type_win32_pstatus_t" 1>&6
- + echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_win32_pstatus_t" >&5
- +echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_win32_pstatus_t" >&6
-
- fi
- fi
-
-
- if test -n "$TRAD_HEADER"; then
- - cat >> confdefs.h <<EOF
- +
- +cat >>confdefs.h <<_ACEOF
- #define TRAD_HEADER $TRAD_HEADER
- -EOF
- +_ACEOF
-
- fi
-
- @@ -6082,8 +10312,10 @@
- # use one entry per line, even though this leads to long lines.
- a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;;
- a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;;
- + amiga_vec) tb="$tb amigaos.lo amigaoslink.lo" ;;
- aix5coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;;
- aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
- + aout_amiga_vec) tb="$tb aout-amiga.lo aout32.lo";;
- aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;;
- aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;;
- aout_mips_big_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
- @@ -6104,6 +10336,7 @@
- b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;;
- bfd_efi_app_ia32_vec) tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;;
- bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;;
- + bfd_elf32_amiga_vec) tb="$tb elf32-amiga.lo elf32.lo $elf" ;;
- bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;;
- bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
- bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
- @@ -6122,6 +10355,7 @@
- bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
- bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
- bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
- + bfd_elf32_i386be_amithlon_vec) tb="$tb elf32-i386-amithlon.lo elf32.lo $elf" ;;
- bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
- bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
- bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
- @@ -6143,6 +10377,7 @@
- bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
- bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
- bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
- + bfd_elf32_morphos_vec) tb="$tb elf32-morphos.lo elf32.lo $elf";;
- bfd_elf32_msp430_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
- bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
- bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
- @@ -6326,7 +10561,9 @@
- cisco_core_little_vec) tb="$tb cisco-core.lo" ;;
-
- "") ;;
- - *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
- + *) { { echo "$as_me:$LINENO: error: *** unknown target vector $vec" >&5
- +echo "$as_me: error: *** unknown target vector $vec" >&2;}
- + { (exit 1); exit 1; }; } ;;
- esac
-
- if test ${target_size} = 64; then
- @@ -6390,32 +10627,40 @@
- bfd_libs='$(BFD64_LIBS) $(BFD32_LIBS)'
- all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
- if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then
- - echo "configure: warning: You have requested a 64 bit BFD configuration, but" 1>&2
- - echo "configure: warning: your compiler may not have a 64 bit integral type" 1>&2
- + { echo "$as_me:$LINENO: WARNING: You have requested a 64 bit BFD configuration, but" >&5
- +echo "$as_me: WARNING: You have requested a 64 bit BFD configuration, but" >&2;}
- + { echo "$as_me:$LINENO: WARNING: your compiler may not have a 64 bit integral type" >&5
- +echo "$as_me: WARNING: your compiler may not have a 64 bit integral type" >&2;}
- fi
- if test -n "$GCC" ; then
- bad_64bit_gcc=no;
- - echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6
- -echo "configure:6400: checking for gcc version with buggy 64-bit support" >&5
- + echo "$as_me:$LINENO: checking for gcc version with buggy 64-bit support" >&5
- +echo $ECHO_N "checking for gcc version with buggy 64-bit support... $ECHO_C" >&6
- # Add more tests for gcc versions with non-working 64-bit support here.
- - cat > conftest.$ac_ext <<EOF
- -#line 6403 "configure"
- -#include "confdefs.h"
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- :__GNUC__:__GNUC_MINOR__:__i386__:
- -EOF
- +_ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- - egrep ": 2 : 91 : 1 :" >/dev/null 2>&1; then
- - rm -rf conftest*
- + $EGREP ": 2 : 91 : 1 :" >/dev/null 2>&1; then
- bad_64bit_gcc=yes;
- - echo "$ac_t""yes: egcs-1.1.2 on ix86 spotted" 1>&6
- + echo "$as_me:$LINENO: result: yes: egcs-1.1.2 on ix86 spotted" >&5
- +echo "${ECHO_T}yes: egcs-1.1.2 on ix86 spotted" >&6
- else
- - rm -rf conftest*
- - echo "$ac_t""no" 1>&6
- + echo "$as_me:$LINENO: result: no" >&5
- +echo "${ECHO_T}no" >&6
- fi
- rm -f conftest*
-
- if test $bad_64bit_gcc = yes ; then
- - { echo "configure: error: A newer version of gcc is needed for the requested 64-bit BFD configuration" 1>&2; exit 1; }
- + { { echo "$as_me:$LINENO: error: A newer version of gcc is needed for the requested 64-bit BFD configuration" >&5
- +echo "$as_me: error: A newer version of gcc is needed for the requested 64-bit BFD configuration" >&2;}
- + { (exit 1); exit 1; }; }
- fi
- fi
- ;;
- @@ -6441,112 +10686,251 @@
- test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}"
-
-
- -for ac_hdr in unistd.h
- +
- +
- +for ac_header in stdlib.h unistd.h
- do
- -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
- -echo "configure:6449: checking for $ac_hdr" >&5
- -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 6454 "configure"
- -#include "confdefs.h"
- -#include <$ac_hdr>
- -EOF
- -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- -{ (eval echo configure:6459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- -if test -z "$ac_err"; then
- - rm -rf conftest*
- - eval "ac_cv_header_$ac_safe=yes"
- +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
- +if eval "test \"\${$as_ac_Header+set}\" = set"; then
- + echo "$as_me:$LINENO: checking for $ac_header" >&5
- +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
- +if eval "test \"\${$as_ac_Header+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +fi
- +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- +else
- + # Is the header compilable?
- +echo "$as_me:$LINENO: checking $ac_header usability" >&5
- +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +$ac_includes_default
- +#include <$ac_header>
- +_ACEOF
- +rm -f conftest.$ac_objext
- +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- + (eval $ac_compile) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest.$ac_objext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + ac_header_compiler=yes
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +ac_header_compiler=no
- +fi
- +rm -f conftest.$ac_objext conftest.$ac_ext
- +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- +echo "${ECHO_T}$ac_header_compiler" >&6
- +
- +# Is the header present?
- +echo "$as_me:$LINENO: checking $ac_header presence" >&5
- +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
- +cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +#include <$ac_header>
- +_ACEOF
- +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- + ac_status=$?
- + grep -v '^ *+' conftest.er1 >conftest.err
- + rm -f conftest.er1
- + cat conftest.err >&5
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } >/dev/null; then
- + if test -s conftest.err; then
- + ac_cpp_err=$ac_c_preproc_warn_flag
- + else
- + ac_cpp_err=
- + fi
- +else
- + ac_cpp_err=yes
- +fi
- +if test -z "$ac_cpp_err"; then
- + ac_header_preproc=yes
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- + ac_header_preproc=no
- +fi
- +rm -f conftest.err conftest.$ac_ext
- +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
- +echo "${ECHO_T}$ac_header_preproc" >&6
- +
- +# So? What about this header?
- +case $ac_header_compiler:$ac_header_preproc in
- + yes:no )
- + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- + (
- + cat <<\_ASBOX
- +## ------------------------------------ ##
- +## Report this to bug-autoconf@gnu.org. ##
- +## ------------------------------------ ##
- +_ASBOX
- + ) |
- + sed "s/^/$as_me: WARNING: /" >&2
- + ;;
- + no:yes )
- + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
- +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- + (
- + cat <<\_ASBOX
- +## ------------------------------------ ##
- +## Report this to bug-autoconf@gnu.org. ##
- +## ------------------------------------ ##
- +_ASBOX
- + ) |
- + sed "s/^/$as_me: WARNING: /" >&2
- + ;;
- +esac
- +echo "$as_me:$LINENO: checking for $ac_header" >&5
- +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
- +if eval "test \"\${$as_ac_Header+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- - echo "$ac_err" >&5
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - eval "ac_cv_header_$ac_safe=no"
- + eval "$as_ac_Header=$ac_header_preproc"
- fi
- -rm -f conftest*
- +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- +
- fi
- -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- - echo "$ac_t""yes" 1>&6
- - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- - cat >> confdefs.h <<EOF
- -#define $ac_tr_hdr 1
- -EOF
- +if test `eval echo '${'$as_ac_Header'}'` = yes; then
- + cat >>confdefs.h <<_ACEOF
- +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
- +_ACEOF
-
- -else
- - echo "$ac_t""no" 1>&6
- fi
- +
- done
-
- +
- for ac_func in getpagesize
- do
- -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- -echo "configure:6488: checking for $ac_func" >&5
- -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 6493 "configure"
- -#include "confdefs.h"
- +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
- +echo "$as_me:$LINENO: checking for $ac_func" >&5
- +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
- +if eval "test \"\${$as_ac_var+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- /* System header to define __stub macros and hopefully few prototypes,
- - which can conflict with char $ac_func(); below. */
- -#include <assert.h>
- + which can conflict with char $ac_func (); below.
- + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- + <limits.h> exists even on freestanding compilers. */
- +#ifdef __STDC__
- +# include <limits.h>
- +#else
- +# include <assert.h>
- +#endif
- /* Override any gcc2 internal prototype to avoid an error. */
- +#ifdef __cplusplus
- +extern "C"
- +{
- +#endif
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- -char $ac_func();
- -
- -int main() {
- -
- +char $ac_func ();
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- -$ac_func();
- +char (*f) () = $ac_func;
- +#endif
- +#ifdef __cplusplus
- +}
- #endif
-
- -; return 0; }
- -EOF
- -if { (eval echo configure:6516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- - rm -rf conftest*
- - eval "ac_cv_func_$ac_func=yes"
- -else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - eval "ac_cv_func_$ac_func=no"
- -fi
- -rm -f conftest*
- -fi
- -
- -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- - echo "$ac_t""yes" 1>&6
- - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- - cat >> confdefs.h <<EOF
- -#define $ac_tr_func 1
- -EOF
- +int
- +main ()
- +{
- +return f != $ac_func;
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + eval "$as_ac_var=yes"
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +eval "$as_ac_var=no"
- +fi
- +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- +fi
- +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
- +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
- +if test `eval echo '${'$as_ac_var'}'` = yes; then
- + cat >>confdefs.h <<_ACEOF
- +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
- +_ACEOF
-
- -else
- - echo "$ac_t""no" 1>&6
- fi
- done
-
- -echo $ac_n "checking for working mmap""... $ac_c" 1>&6
- -echo "configure:6541: checking for working mmap" >&5
- -if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- +echo "$as_me:$LINENO: checking for working mmap" >&5
- +echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
- +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- if test "$cross_compiling" = yes; then
- ac_cv_func_mmap_fixed_mapped=no
- else
- - cat > conftest.$ac_ext <<EOF
- -#line 6549 "configure"
- -#include "confdefs.h"
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- +$ac_includes_default
- +/* malloc might have been renamed as rpl_malloc. */
- +#undef malloc
-
- /* Thanks to Mike Haertel and Jim Avera for this test.
- Here is a matrix of mmap possibilities:
- @@ -6560,34 +10944,34 @@
- back from the file, nor mmap's back from the file at a different
- address. (There have been systems where private was not correctly
- implemented like the infamous i386 svr4.0, and systems where the
- - VM page cache was not coherent with the filesystem buffer cache
- + VM page cache was not coherent with the file system buffer cache
- like early versions of FreeBSD and possibly contemporary NetBSD.)
- For shared mappings, we should conversely verify that changes get
- - propogated back to all the places they're supposed to be.
- + propagated back to all the places they're supposed to be.
-
- Grep wants private fixed already mapped.
- The main things grep needs to know about mmap are:
- * does it exist and is it safe to write into the mmap'd area
- * how to use it (BSD variants) */
- -#include <sys/types.h>
- +
- #include <fcntl.h>
- #include <sys/mman.h>
-
- -/* This mess was copied from the GNU getpagesize.h. */
- -#ifndef HAVE_GETPAGESIZE
- -# ifdef HAVE_UNISTD_H
- -# include <unistd.h>
- -# endif
- +#if !STDC_HEADERS && !HAVE_STDLIB_H
- +char *malloc ();
- +#endif
-
- +/* This mess was copied from the GNU getpagesize.h. */
- +#if !HAVE_GETPAGESIZE
- /* Assume that all systems that can run configure have sys/param.h. */
- -# ifndef HAVE_SYS_PARAM_H
- +# if !HAVE_SYS_PARAM_H
- # define HAVE_SYS_PARAM_H 1
- # endif
-
- # ifdef _SC_PAGESIZE
- # define getpagesize() sysconf(_SC_PAGESIZE)
- # else /* no _SC_PAGESIZE */
- -# ifdef HAVE_SYS_PARAM_H
- +# if HAVE_SYS_PARAM_H
- # include <sys/param.h>
- # ifdef EXEC_PAGESIZE
- # define getpagesize() EXEC_PAGESIZE
- @@ -6614,599 +10998,1556 @@
-
- #endif /* no HAVE_GETPAGESIZE */
-
- -#ifdef __cplusplus
- -extern "C" { void *malloc(unsigned); }
- -#else
- -char *malloc();
- -#endif
- -
- int
- -main()
- +main ()
- {
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
-
- - pagesize = getpagesize();
- + pagesize = getpagesize ();
-
- - /*
- - * First, make a file with some known garbage in it.
- - */
- - data = malloc(pagesize);
- + /* First, make a file with some known garbage in it. */
- + data = (char *) malloc (pagesize);
- if (!data)
- - exit(1);
- + exit (1);
- for (i = 0; i < pagesize; ++i)
- - *(data + i) = rand();
- - umask(0);
- - fd = creat("conftestmmap", 0600);
- + *(data + i) = rand ();
- + umask (0);
- + fd = creat ("conftest.mmap", 0600);
- if (fd < 0)
- - exit(1);
- - if (write(fd, data, pagesize) != pagesize)
- - exit(1);
- - close(fd);
- -
- - /*
- - * Next, try to mmap the file at a fixed address which
- - * already has something else allocated at it. If we can,
- - * also make sure that we see the same garbage.
- - */
- - fd = open("conftestmmap", O_RDWR);
- + exit (1);
- + if (write (fd, data, pagesize) != pagesize)
- + exit (1);
- + close (fd);
- +
- + /* Next, try to mmap the file at a fixed address which already has
- + something else allocated at it. If we can, also make sure that
- + we see the same garbage. */
- + fd = open ("conftest.mmap", O_RDWR);
- if (fd < 0)
- - exit(1);
- - data2 = malloc(2 * pagesize);
- + exit (1);
- + data2 = (char *) malloc (2 * pagesize);
- if (!data2)
- - exit(1);
- + exit (1);
- data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
- - if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
- + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- - exit(1);
- + exit (1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- - exit(1);
- + exit (1);
-
- - /*
- - * Finally, make sure that changes to the mapped area
- - * do not percolate back to the file as seen by read().
- - * (This is a bug on some variants of i386 svr4.0.)
- - */
- + /* Finally, make sure that changes to the mapped area do not
- + percolate back to the file as seen by read(). (This is a bug on
- + some variants of i386 svr4.0.) */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- - data3 = malloc(pagesize);
- + data3 = (char *) malloc (pagesize);
- if (!data3)
- - exit(1);
- - if (read(fd, data3, pagesize) != pagesize)
- - exit(1);
- + exit (1);
- + if (read (fd, data3, pagesize) != pagesize)
- + exit (1);
- for (i = 0; i < pagesize; ++i)
- - if (*(data + i) != *(data3 + i))
- - exit(1);
- - close(fd);
- - unlink("conftestmmap");
- - exit(0);
- -}
- -
- -EOF
- -if { (eval echo configure:6689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- -then
- + if (*(data + i) != *(data3 + i))
- + exit (1);
- + close (fd);
- + exit (0);
- +}
- +_ACEOF
- +rm -f conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- ac_cv_func_mmap_fixed_mapped=yes
- else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -fr conftest*
- - ac_cv_func_mmap_fixed_mapped=no
- + echo "$as_me: program exited with status $ac_status" >&5
- +echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +( exit $ac_status )
- +ac_cv_func_mmap_fixed_mapped=no
- fi
- -rm -fr conftest*
- +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
- -
- fi
- -
- -echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
- +echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
- +echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
- if test $ac_cv_func_mmap_fixed_mapped = yes; then
- - cat >> confdefs.h <<\EOF
- +
- +cat >>confdefs.h <<\_ACEOF
- #define HAVE_MMAP 1
- -EOF
- +_ACEOF
-
- fi
- +rm -f conftest.mmap
- +
- +
-
- for ac_func in madvise mprotect
- do
- -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- -echo "configure:6714: checking for $ac_func" >&5
- -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- - echo $ac_n "(cached) $ac_c" 1>&6
- -else
- - cat > conftest.$ac_ext <<EOF
- -#line 6719 "configure"
- -#include "confdefs.h"
- +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
- +echo "$as_me:$LINENO: checking for $ac_func" >&5
- +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
- +if eval "test \"\${$as_ac_var+set}\" = set"; then
- + echo $ECHO_N "(cached) $ECHO_C" >&6
- +else
- + cat >conftest.$ac_ext <<_ACEOF
- +#line $LINENO "configure"
- +/* confdefs.h. */
- +_ACEOF
- +cat confdefs.h >>conftest.$ac_ext
- +cat >>conftest.$ac_ext <<_ACEOF
- +/* end confdefs.h. */
- /* System header to define __stub macros and hopefully few prototypes,
- - which can conflict with char $ac_func(); below. */
- -#include <assert.h>
- + which can conflict with char $ac_func (); below.
- + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- + <limits.h> exists even on freestanding compilers. */
- +#ifdef __STDC__
- +# include <limits.h>
- +#else
- +# include <assert.h>
- +#endif
- /* Override any gcc2 internal prototype to avoid an error. */
- +#ifdef __cplusplus
- +extern "C"
- +{
- +#endif
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- -char $ac_func();
- -
- -int main() {
- -
- +char $ac_func ();
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- -$ac_func();
- +char (*f) () = $ac_func;
- +#endif
- +#ifdef __cplusplus
- +}
- #endif
-
- -; return 0; }
- -EOF
- -if { (eval echo configure:6742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- - rm -rf conftest*
- - eval "ac_cv_func_$ac_func=yes"
- -else
- - echo "configure: failed program was:" >&5
- - cat conftest.$ac_ext >&5
- - rm -rf conftest*
- - eval "ac_cv_func_$ac_func=no"
- -fi
- -rm -f conftest*
- -fi
- -
- -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- - echo "$ac_t""yes" 1>&6
- - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- - cat >> confdefs.h <<EOF
- -#define $ac_tr_func 1
- -EOF
- +int
- +main ()
- +{
- +return f != $ac_func;
- + ;
- + return 0;
- +}
- +_ACEOF
- +rm -f conftest.$ac_objext conftest$ac_exeext
- +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- + (eval $ac_link) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); } &&
- + { ac_try='test -s conftest$ac_exeext'
- + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- + (eval $ac_try) 2>&5
- + ac_status=$?
- + echo "$as_me:$LINENO: \$? = $ac_status" >&5
- + (exit $ac_status); }; }; then
- + eval "$as_ac_var=yes"
- +else
- + echo "$as_me: failed program was:" >&5
- +sed 's/^/| /' conftest.$ac_ext >&5
- +
- +eval "$as_ac_var=no"
- +fi
- +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- +fi
- +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
- +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
- +if test `eval echo '${'$as_ac_var'}'` = yes; then
- + cat >>confdefs.h <<_ACEOF
- +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
- +_ACEOF
-
- -else
- - echo "$ac_t""no" 1>&6
- fi
- done
-
- case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
- - true+yes ) cat >> confdefs.h <<\EOF
- + true+yes )
- +cat >>confdefs.h <<\_ACEOF
- #define USE_MMAP 1
- -EOF
- +_ACEOF
- ;;
- esac
-
- rm -f doc/config.status
- -trap '' 1 2 15
- -cat > confcache <<\EOF
- + ac_config_files="$ac_config_files Makefile doc/Makefile bfd-in3.h:bfd-in2.h bfdver.h:version.h po/Makefile.in:po/Make-in"
- + ac_config_commands="$ac_config_commands default"
- +cat >confcache <<\_ACEOF
- # This file is a shell script that caches the results of configure
- # tests run on this system so they can be shared between configure
- -# scripts and configure runs. It is not useful on other systems.
- -# If it contains results you don't want to keep, you may remove or edit it.
- +# scripts and configure runs, see configure's option --config-cache.
- +# It is not useful on other systems. If it contains results you don't
- +# want to keep, you may remove or edit it.
- #
- -# By default, configure uses ./config.cache as the cache file,
- -# creating it if it does not exist already. You can give configure
- -# the --cache-file=FILE option to use a different cache file; that is
- -# what configure does when it calls configure scripts in
- -# subdirectories, so they share the cache.
- -# Giving --cache-file=/dev/null disables caching, for debugging configure.
- -# config.status only pays attention to the cache file if you give it the
- -# --recheck option to rerun configure.
- +# config.status only pays attention to the cache file if you give it
- +# the --recheck option to rerun configure.
- #
- -EOF
- +# `ac_cv_env_foo' variables (set or unset) will be overridden when
- +# loading this file, other *unset* `ac_cv_foo' will be assigned the
- +# following values.
- +
- +_ACEOF
- +
- # The following way of writing the cache mishandles newlines in values,
- # but we know of no workaround that is simple, portable, and efficient.
- # So, don't put newlines in cache variables' values.
- # Ultrix sh set writes to stderr and can't be redirected directly,
- # and sets the high bit in the cache file unless we assign to the vars.
- -(set) 2>&1 |
- +{
- + (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- - # `set' does not quote correctly, so add quotes (double-quote substitution
- - # turns \\\\ into \\, and sed turns \\ into \).
- + # `set' does not quote correctly, so add quotes (double-quote
- + # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- - -e "s/'/'\\\\''/g" \
- - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- + "s/'/'\\\\''/g;
- + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- + sed -n \
- + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- - esac >> confcache
- -if cmp -s $cache_file confcache; then
- - :
- -else
- + esac;
- +} |
- + sed '
- + t clear
- + : clear
- + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- + t end
- + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- + : end' >>confcache
- +if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- - echo "updating cache $cache_file"
- - cat confcache > $cache_file
- + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
- + cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
- fi
- rm -f confcache
-
- -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
- -
- test "x$prefix" = xNONE && prefix=$ac_default_prefix
- # Let make expand exec_prefix.
- test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
- -# Any assignment to VPATH causes Sun make to only execute
- -# the first set of double-colon rules, so remove it if not needed.
- -# If there is a colon in the path, we need to keep it.
- +# VPATH may cause trouble with some makes, so we remove $(srcdir),
- +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
- +# trailing colons and then remove the whole line if VPATH becomes empty
- +# (actually we leave an empty line to preserve line numbers).
- if test "x$srcdir" = x.; then
- - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
- + ac_vpsub='/^[ ]*VPATH[ ]*=/{
- +s/:*\$(srcdir):*/:/;
- +s/:*\${srcdir}:*/:/;
- +s/:*@srcdir@:*/:/;
- +s/^\([^=]*=[ ]*\):*/\1/;
- +s/:*$//;
- +s/^[^=]*=[ ]*$//;
- +}'
- fi
-
- -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
- -
- DEFS=-DHAVE_CONFIG_H
-
- -# Without the "./", some shells look in PATH for config.status.
- -: ${CONFIG_STATUS=./config.status}
- +ac_libobjs=
- +ac_ltlibobjs=
- +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- + # 1. Remove the extension, and $U if already installed.
- + ac_i=`echo "$ac_i" |
- + sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- + # 2. Add them.
- + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
- +done
- +LIBOBJS=$ac_libobjs
-
- -echo creating $CONFIG_STATUS
- -rm -f $CONFIG_STATUS
- -cat > $CONFIG_STATUS <<EOF
- -#! /bin/sh
- -# Generated automatically by configure.
- +LTLIBOBJS=$ac_ltlibobjs
- +
- +
- +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
- +Usually this means the macro was only invoked conditionally." >&5
- +echo "$as_me: error: conditional \"AMDEP\" was never defined.
- +Usually this means the macro was only invoked conditionally." >&2;}
- + { (exit 1); exit 1; }; }
- +fi
- +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
- + { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
- +Usually this means the macro was only invoked conditionally." >&5
- +echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
- +Usually this means the macro was only invoked conditionally." >&2;}
- + { (exit 1); exit 1; }; }
- +fi
- +if test -z "${INSTALL_LIBBFD_TRUE}" && test -z "${INSTALL_LIBBFD_FALSE}"; then
- + { { echo "$as_me:$LINENO: error: conditional \"INSTALL_LIBBFD\" was never defined.
- +Usually this means the macro was only invoked conditionally." >&5
- +echo "$as_me: error: conditional \"INSTALL_LIBBFD\" was never defined.
- +Usually this means the macro was only invoked conditionally." >&2;}
- + { (exit 1); exit 1; }; }
- +fi
- +
- +: ${CONFIG_STATUS=./config.status}
- +ac_clean_files_save=$ac_clean_files
- +ac_clean_files="$ac_clean_files $CONFIG_STATUS"
- +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
- +echo "$as_me: creating $CONFIG_STATUS" >&6;}
- +cat >$CONFIG_STATUS <<_ACEOF
- +#! $SHELL
- +# Generated by $as_me.
- # Run this file to recreate the current configuration.
- -# This directory was configured as follows,
- -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
- -#
- -# $0 $ac_configure_args
- -#
- # Compiler output produced by configure, useful for debugging
- -# configure, is in ./config.log if it exists.
- +# configure, is in config.log if it exists.
-
- -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
- -for ac_option
- +debug=false
- +ac_cs_recheck=false
- +ac_cs_silent=false
- +SHELL=\${CONFIG_SHELL-$SHELL}
- +_ACEOF
- +
- +cat >>$CONFIG_STATUS <<\_ACEOF
- +## --------------------- ##
- +## M4sh Initialization. ##
- +## --------------------- ##
- +
- +# Be Bourne compatible
- +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- + emulate sh
- + NULLCMD=:
- + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- + # is contrary to our usage. Disable this feature.
- + alias -g '${1+"$@"}'='"$@"'
- +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- + set -o posix
- +fi
- +
- +# Support unset when possible.
- +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
- + as_unset=unset
- +else
- + as_unset=false
- +fi
- +
- +
- +# Work around bugs in pre-3.0 UWIN ksh.
- +$as_unset ENV MAIL MAILPATH
- +PS1='$ '
- +PS2='> '
- +PS4='+ '
- +
- +# NLS nuisances.
- +for as_var in \
- + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- + LC_TELEPHONE LC_TIME
- +do
- + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
- + eval $as_var=C; export $as_var
- + else
- + $as_unset $as_var
- + fi
- +done
- +
- +# Required to use basename.
- +if expr a : '\(a\)' >/dev/null 2>&1; then
- + as_expr=expr
- +else
- + as_expr=false
- +fi
- +
- +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- + as_basename=basename
- +else
- + as_basename=false
- +fi
- +
- +
- +# Name of the executable.
- +as_me=`$as_basename "$0" ||
- +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- + X"$0" : 'X\(//\)$' \| \
- + X"$0" : 'X\(/\)$' \| \
- + . : '\(.\)' 2>/dev/null ||
- +echo X/"$0" |
- + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- + /^X\/\(\/\/\)$/{ s//\1/; q; }
- + /^X\/\(\/\).*/{ s//\1/; q; }
- + s/.*/./; q'`
- +
- +
- +# PATH needs CR, and LINENO needs CR and PATH.
- +# Avoid depending upon Character Ranges.
- +as_cr_letters='abcdefghijklmnopqrstuvwxyz'
- +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
- +as_cr_Letters=$as_cr_letters$as_cr_LETTERS
- +as_cr_digits='0123456789'
- +as_cr_alnum=$as_cr_Letters$as_cr_digits
- +
- +# The user is always right.
- +if test "${PATH_SEPARATOR+set}" != set; then
- + echo "#! /bin/sh" >conf$$.sh
- + echo "exit 0" >>conf$$.sh
- + chmod +x conf$$.sh
- + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- + PATH_SEPARATOR=';'
- + else
- + PATH_SEPARATOR=:
- + fi
- + rm -f conf$$.sh
- +fi
- +
- +
- + as_lineno_1=$LINENO
- + as_lineno_2=$LINENO
- + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- + test "x$as_lineno_1" != "x$as_lineno_2" &&
- + test "x$as_lineno_3" = "x$as_lineno_2" || {
- + # Find who we are. Look in the path if we contain no path at all
- + # relative or not.
- + case $0 in
- + *[\\/]* ) as_myself=$0 ;;
- + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in $PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
- +done
- +
- + ;;
- + esac
- + # We did not find ourselves, most probably we were run as `sh COMMAND'
- + # in which case we are not to be found in the path.
- + if test "x$as_myself" = x; then
- + as_myself=$0
- + fi
- + if test ! -f "$as_myself"; then
- + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
- +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- + { (exit 1); exit 1; }; }
- + fi
- + case $CONFIG_SHELL in
- + '')
- + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
- +do
- + IFS=$as_save_IFS
- + test -z "$as_dir" && as_dir=.
- + for as_base in sh bash ksh sh5; do
- + case $as_dir in
- + /*)
- + if ("$as_dir/$as_base" -c '
- + as_lineno_1=$LINENO
- + as_lineno_2=$LINENO
- + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- + test "x$as_lineno_1" != "x$as_lineno_2" &&
- + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- + CONFIG_SHELL=$as_dir/$as_base
- + export CONFIG_SHELL
- + exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- + fi;;
- + esac
- + done
- +done
- +;;
- + esac
- +
- + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- + # uniformly replaced by the line number. The first 'sed' inserts a
- + # line-number line before each line; the second 'sed' does the real
- + # work. The second script uses 'N' to pair each line-number line
- + # with the numbered line, and appends trailing '-' during
- + # substitution so that $LINENO is not a special case at line end.
- + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- + sed '=' <$as_myself |
- + sed '
- + N
- + s,$,-,
- + : loop
- + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- + t loop
- + s,-$,,
- + s,^['$as_cr_digits']*\n,,
- + ' >$as_me.lineno &&
- + chmod +x $as_me.lineno ||
- + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
- +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
- + { (exit 1); exit 1; }; }
- +
- + # Don't try to exec as it changes $[0], causing all sort of problems
- + # (the dirname of $[0] is not the place where we might find the
- + # original and so on. Autoconf is especially sensible to this).
- + . ./$as_me.lineno
- + # Exit status is that of the last command.
- + exit
- +}
- +
- +
- +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- + *c*,-n*) ECHO_N= ECHO_C='
- +' ECHO_T=' ' ;;
- + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- + *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
- +esac
- +
- +if expr a : '\(a\)' >/dev/null 2>&1; then
- + as_expr=expr
- +else
- + as_expr=false
- +fi
- +
- +rm -f conf$$ conf$$.exe conf$$.file
- +echo >conf$$.file
- +if ln -s conf$$.file conf$$ 2>/dev/null; then
- + # We could just check for DJGPP; but this test a) works b) is more generic
- + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- + if test -f conf$$.exe; then
- + # Don't use ln at all; we don't have any links
- + as_ln_s='cp -p'
- + else
- + as_ln_s='ln -s'
- + fi
- +elif ln conf$$.file conf$$ 2>/dev/null; then
- + as_ln_s=ln
- +else
- + as_ln_s='cp -p'
- +fi
- +rm -f conf$$ conf$$.exe conf$$.file
- +
- +if mkdir -p . 2>/dev/null; then
- + as_mkdir_p=:
- +else
- + as_mkdir_p=false
- +fi
- +
- +as_executable_p="test -f"
- +
- +# Sed expression to map a string onto a valid CPP name.
- +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
- +
- +# Sed expression to map a string onto a valid variable name.
- +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
- +
- +
- +# IFS
- +# We need space, tab and new line, in precisely that order.
- +as_nl='
- +'
- +IFS=" $as_nl"
- +
- +# CDPATH.
- +$as_unset CDPATH
- +
- +exec 6>&1
- +
- +# Open the log real soon, to keep \$[0] and so on meaningful, and to
- +# report actual input values of CONFIG_FILES etc. instead of their
- +# values after options handling. Logging --version etc. is OK.
- +exec 5>>config.log
- +{
- + echo
- + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
- +## Running $as_me. ##
- +_ASBOX
- +} >&5
- +cat >&5 <<_CSEOF
- +
- +This file was extended by $as_me, which was
- +generated by GNU Autoconf 2.57. Invocation command line was
- +
- + CONFIG_FILES = $CONFIG_FILES
- + CONFIG_HEADERS = $CONFIG_HEADERS
- + CONFIG_LINKS = $CONFIG_LINKS
- + CONFIG_COMMANDS = $CONFIG_COMMANDS
- + $ $0 $@
- +
- +_CSEOF
- +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
- +echo >&5
- +_ACEOF
- +
- +# Files that config.status was made for.
- +if test -n "$ac_config_files"; then
- + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
- +fi
- +
- +if test -n "$ac_config_headers"; then
- + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
- +fi
- +
- +if test -n "$ac_config_links"; then
- + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
- +fi
- +
- +if test -n "$ac_config_commands"; then
- + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
- +fi
- +
- +cat >>$CONFIG_STATUS <<\_ACEOF
- +
- +ac_cs_usage="\
- +\`$as_me' instantiates files from templates according to the
- +current configuration.
- +
- +Usage: $0 [OPTIONS] [FILE]...
- +
- + -h, --help print this help, then exit
- + -V, --version print version number, then exit
- + -q, --quiet do not print progress messages
- + -d, --debug don't remove temporary files
- + --recheck update $as_me by reconfiguring in the same conditions
- + --file=FILE[:TEMPLATE]
- + instantiate the configuration file FILE
- + --header=FILE[:TEMPLATE]
- + instantiate the configuration header FILE
- +
- +Configuration files:
- +$config_files
- +
- +Configuration headers:
- +$config_headers
- +
- +Configuration commands:
- +$config_commands
- +
- +Report bugs to <bug-autoconf@gnu.org>."
- +_ACEOF
- +
- +cat >>$CONFIG_STATUS <<_ACEOF
- +ac_cs_version="\\
- +config.status
- +configured by $0, generated by GNU Autoconf 2.57,
- + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
- +
- +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
- +Free Software Foundation, Inc.
- +This config.status script is free software; the Free Software Foundation
- +gives unlimited permission to copy, distribute and modify it."
- +srcdir=$srcdir
- +INSTALL="$INSTALL"
- +_ACEOF
- +
- +cat >>$CONFIG_STATUS <<\_ACEOF
- +# If no file are specified by the user, then we need to provide default
- +# value. By we need to know if files were specified by the user.
- +ac_need_defaults=:
- +while test $# != 0
- do
- - case "\$ac_option" in
- + case $1 in
- + --*=*)
- + ac_option=`expr "x$1" : 'x\([^=]*\)='`
- + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
- + ac_shift=:
- + ;;
- + -*)
- + ac_option=$1
- + ac_optarg=$2
- + ac_shift=shift
- + ;;
- + *) # This is not an option, so the user has probably given explicit
- + # arguments.
- + ac_option=$1
- + ac_need_defaults=false;;
- + esac
- +
- + case $ac_option in
- + # Handling of the options.
- +_ACEOF
- +cat >>$CONFIG_STATUS <<\_ACEOF
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- - -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- - echo "$CONFIG_STATUS generated by autoconf version 2.13"
- - exit 0 ;;
- - -help | --help | --hel | --he | --h)
- - echo "\$ac_cs_usage"; exit 0 ;;
- - *) echo "\$ac_cs_usage"; exit 1 ;;
- + ac_cs_recheck=: ;;
- + --version | --vers* | -V )
- + echo "$ac_cs_version"; exit 0 ;;
- + --he | --h)
- + # Conflict between --help and --header
- + { { echo "$as_me:$LINENO: error: ambiguous option: $1
- +Try \`$0 --help' for more information." >&5
- +echo "$as_me: error: ambiguous option: $1
- +Try \`$0 --help' for more information." >&2;}
- + { (exit 1); exit 1; }; };;
- + --help | --hel | -h )
- + echo "$ac_cs_usage"; exit 0 ;;
- + --debug | --d* | -d )
- + debug=: ;;
- + --file | --fil | --fi | --f )
- + $ac_shift
- + CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- + ac_need_defaults=false;;
- + --header | --heade | --head | --hea )
- + $ac_shift
- + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
- + ac_need_defaults=false;;
- + -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- + | -silent | --silent | --silen | --sile | --sil | --si | --s)
- + ac_cs_silent=: ;;
- +
- + # This is an error.
- + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
- +Try \`$0 --help' for more information." >&5
- +echo "$as_me: error: unrecognized option: $1
- +Try \`$0 --help' for more information." >&2;}
- + { (exit 1); exit 1; }; } ;;
- +
- + *) ac_config_targets="$ac_config_targets $1" ;;
- +
- esac
- + shift
- done
-
- -ac_given_srcdir=$srcdir
- -ac_given_INSTALL="$INSTALL"
- +ac_configure_extra_args=
-
- -trap 'rm -fr `echo "Makefile doc/Makefile bfd-in3.h:bfd-in2.h bfdver.h:version.h po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
- -EOF
- -cat >> $CONFIG_STATUS <<EOF
- +if $ac_cs_silent; then
- + exec 6>/dev/null
- + ac_configure_extra_args="$ac_configure_extra_args --silent"
- +fi
-
- -# Protect against being on the right side of a sed subst in config.status.
- -sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- - s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
- -$ac_vpsub
- -$extrasub
- -s%@SHELL@%$SHELL%g
- -s%@CFLAGS@%$CFLAGS%g
- -s%@CPPFLAGS@%$CPPFLAGS%g
- -s%@CXXFLAGS@%$CXXFLAGS%g
- -s%@FFLAGS@%$FFLAGS%g
- -s%@DEFS@%$DEFS%g
- -s%@LDFLAGS@%$LDFLAGS%g
- -s%@LIBS@%$LIBS%g
- -s%@exec_prefix@%$exec_prefix%g
- -s%@prefix@%$prefix%g
- -s%@program_transform_name@%$program_transform_name%g
- -s%@bindir@%$bindir%g
- -s%@sbindir@%$sbindir%g
- -s%@libexecdir@%$libexecdir%g
- -s%@datadir@%$datadir%g
- -s%@sysconfdir@%$sysconfdir%g
- -s%@sharedstatedir@%$sharedstatedir%g
- -s%@localstatedir@%$localstatedir%g
- -s%@libdir@%$libdir%g
- -s%@includedir@%$includedir%g
- -s%@oldincludedir@%$oldincludedir%g
- -s%@infodir@%$infodir%g
- -s%@mandir@%$mandir%g
- -s%@host@%$host%g
- -s%@host_alias@%$host_alias%g
- -s%@host_cpu@%$host_cpu%g
- -s%@host_vendor@%$host_vendor%g
- -s%@host_os@%$host_os%g
- -s%@target@%$target%g
- -s%@target_alias@%$target_alias%g
- -s%@target_cpu@%$target_cpu%g
- -s%@target_vendor@%$target_vendor%g
- -s%@target_os@%$target_os%g
- -s%@build@%$build%g
- -s%@build_alias@%$build_alias%g
- -s%@build_cpu@%$build_cpu%g
- -s%@build_vendor@%$build_vendor%g
- -s%@build_os@%$build_os%g
- -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
- -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
- -s%@INSTALL_DATA@%$INSTALL_DATA%g
- -s%@PACKAGE@%$PACKAGE%g
- -s%@VERSION@%$VERSION%g
- -s%@ACLOCAL@%$ACLOCAL%g
- -s%@AUTOCONF@%$AUTOCONF%g
- -s%@AUTOMAKE@%$AUTOMAKE%g
- -s%@AUTOHEADER@%$AUTOHEADER%g
- -s%@MAKEINFO@%$MAKEINFO%g
- -s%@SET_MAKE@%$SET_MAKE%g
- -s%@bfd_version@%$bfd_version%g
- -s%@bfd_version_string@%$bfd_version_string%g
- -s%@AR@%$AR%g
- -s%@RANLIB@%$RANLIB%g
- -s%@CC@%$CC%g
- -s%@LN_S@%$LN_S%g
- -s%@OBJEXT@%$OBJEXT%g
- -s%@EXEEXT@%$EXEEXT%g
- -s%@STRIP@%$STRIP%g
- -s%@LIBTOOL@%$LIBTOOL%g
- -s%@WARN_CFLAGS@%$WARN_CFLAGS%g
- -s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
- -s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
- -s%@MAINT@%$MAINT%g
- -s%@INSTALL_LIBBFD_TRUE@%$INSTALL_LIBBFD_TRUE%g
- -s%@INSTALL_LIBBFD_FALSE@%$INSTALL_LIBBFD_FALSE%g
- -s%@bfdlibdir@%$bfdlibdir%g
- -s%@bfdincludedir@%$bfdincludedir%g
- -s%@CPP@%$CPP%g
- -s%@ALLOCA@%$ALLOCA%g
- -s%@USE_NLS@%$USE_NLS%g
- -s%@MSGFMT@%$MSGFMT%g
- -s%@GMSGFMT@%$GMSGFMT%g
- -s%@XGETTEXT@%$XGETTEXT%g
- -s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
- -s%@CATALOGS@%$CATALOGS%g
- -s%@CATOBJEXT@%$CATOBJEXT%g
- -s%@DATADIRNAME@%$DATADIRNAME%g
- -s%@GMOFILES@%$GMOFILES%g
- -s%@INSTOBJEXT@%$INSTOBJEXT%g
- -s%@INTLDEPS@%$INTLDEPS%g
- -s%@INTLLIBS@%$INTLLIBS%g
- -s%@INTLOBJS@%$INTLOBJS%g
- -s%@POFILES@%$POFILES%g
- -s%@POSUB@%$POSUB%g
- -s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
- -s%@GT_NO@%$GT_NO%g
- -s%@GT_YES@%$GT_YES%g
- -s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
- -s%@l@%$l%g
- -s%@HDEFINES@%$HDEFINES%g
- -s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g
- -s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g
- -s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g
- -s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g
- -s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
- -s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
- -s%@COREFILE@%$COREFILE%g
- -s%@COREFLAG@%$COREFLAG%g
- -s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g
- -s%@WIN32LIBADD@%$WIN32LIBADD%g
- -s%@TDEFINES@%$TDEFINES%g
- -s%@wordsize@%$wordsize%g
- -s%@bfd_libs@%$bfd_libs%g
- -s%@all_backends@%$all_backends%g
- -s%@bfd_backends@%$bfd_backends%g
- -s%@bfd_machines@%$bfd_machines%g
- -s%@bfd_default_target_size@%$bfd_default_target_size%g
- -s%@tdefaults@%$tdefaults%g
- +_ACEOF
- +cat >>$CONFIG_STATUS <<_ACEOF
- +if \$ac_cs_recheck; then
- + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
- +fi
- +
- +_ACEOF
- +
- +cat >>$CONFIG_STATUS <<_ACEOF
- +#
- +# INIT-COMMANDS section.
- +#
- +
- +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
- +
- +_ACEOF
- +
- +
- +
- +cat >>$CONFIG_STATUS <<\_ACEOF
- +for ac_config_target in $ac_config_targets
- +do
- + case "$ac_config_target" in
- + # Handling of arguments.
- + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- + "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
- + "bfd-in3.h" ) CONFIG_FILES="$CONFIG_FILES bfd-in3.h:bfd-in2.h" ;;
- + "bfdver.h" ) CONFIG_FILES="$CONFIG_FILES bfdver.h:version.h" ;;
- + "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in:po/Make-in" ;;
- + "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
- + "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
- + "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
- + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
- +echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- + { (exit 1); exit 1; }; };;
- + esac
- +done
- +
- +# If the user did not use the arguments to specify the items to instantiate,
- +# then the envvar interface is used. Set only those that are not.
- +# We use the long form for the default assignment because of an extremely
- +# bizarre bug on SunOS 4.1.3.
- +if $ac_need_defaults; then
- + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
- + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
- +fi
- +
- +# Have a temporary directory for convenience. Make it in the build tree
- +# simply because there is no reason to put it here, and in addition,
- +# creating and moving files from /tmp can sometimes cause problems.
- +# Create a temporary directory, and hook for its removal unless debugging.
- +$debug ||
- +{
- + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- + trap '{ (exit 1); exit 1; }' 1 2 13 15
- +}
- +
- +# Create a (secure) tmp directory for tmp files.
- +
- +{
- + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
- + test -n "$tmp" && test -d "$tmp"
- +} ||
- +{
- + tmp=./confstat$$-$RANDOM
- + (umask 077 && mkdir $tmp)
- +} ||
- +{
- + echo "$me: cannot create a temporary directory in ." >&2
- + { (exit 1); exit 1; }
- +}
- +
- +_ACEOF
- +
- +cat >>$CONFIG_STATUS <<_ACEOF
-
- +#
- +# CONFIG_FILES section.
- +#
- +
- +# No need to generate the scripts if there are no CONFIG_FILES.
- +# This happens for instance when ./config.status config.h
- +if test -n "\$CONFIG_FILES"; then
- + # Protect against being on the right side of a sed subst in config.status.
- + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
- +s,@SHELL@,$SHELL,;t t
- +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
- +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
- +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
- +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
- +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
- +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
- +s,@exec_prefix@,$exec_prefix,;t t
- +s,@prefix@,$prefix,;t t
- +s,@program_transform_name@,$program_transform_name,;t t
- +s,@bindir@,$bindir,;t t
- +s,@sbindir@,$sbindir,;t t
- +s,@libexecdir@,$libexecdir,;t t
- +s,@datadir@,$datadir,;t t
- +s,@sysconfdir@,$sysconfdir,;t t
- +s,@sharedstatedir@,$sharedstatedir,;t t
- +s,@localstatedir@,$localstatedir,;t t
- +s,@libdir@,$libdir,;t t
- +s,@includedir@,$includedir,;t t
- +s,@oldincludedir@,$oldincludedir,;t t
- +s,@infodir@,$infodir,;t t
- +s,@mandir@,$mandir,;t t
- +s,@build_alias@,$build_alias,;t t
- +s,@host_alias@,$host_alias,;t t
- +s,@target_alias@,$target_alias,;t t
- +s,@DEFS@,$DEFS,;t t
- +s,@ECHO_C@,$ECHO_C,;t t
- +s,@ECHO_N@,$ECHO_N,;t t
- +s,@ECHO_T@,$ECHO_T,;t t
- +s,@LIBS@,$LIBS,;t t
- +s,@build@,$build,;t t
- +s,@build_cpu@,$build_cpu,;t t
- +s,@build_vendor@,$build_vendor,;t t
- +s,@build_os@,$build_os,;t t
- +s,@host@,$host,;t t
- +s,@host_cpu@,$host_cpu,;t t
- +s,@host_vendor@,$host_vendor,;t t
- +s,@host_os@,$host_os,;t t
- +s,@target@,$target,;t t
- +s,@target_cpu@,$target_cpu,;t t
- +s,@target_vendor@,$target_vendor,;t t
- +s,@target_os@,$target_os,;t t
- +s,@CC@,$CC,;t t
- +s,@CFLAGS@,$CFLAGS,;t t
- +s,@LDFLAGS@,$LDFLAGS,;t t
- +s,@CPPFLAGS@,$CPPFLAGS,;t t
- +s,@ac_ct_CC@,$ac_ct_CC,;t t
- +s,@EXEEXT@,$EXEEXT,;t t
- +s,@OBJEXT@,$OBJEXT,;t t
- +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
- +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
- +s,@INSTALL_DATA@,$INSTALL_DATA,;t t
- +s,@PACKAGE@,$PACKAGE,;t t
- +s,@VERSION@,$VERSION,;t t
- +s,@ACLOCAL@,$ACLOCAL,;t t
- +s,@AUTOCONF@,$AUTOCONF,;t t
- +s,@AUTOMAKE@,$AUTOMAKE,;t t
- +s,@AUTOHEADER@,$AUTOHEADER,;t t
- +s,@MAKEINFO@,$MAKEINFO,;t t
- +s,@AMTAR@,$AMTAR,;t t
- +s,@install_sh@,$install_sh,;t t
- +s,@STRIP@,$STRIP,;t t
- +s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
- +s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
- +s,@AWK@,$AWK,;t t
- +s,@SET_MAKE@,$SET_MAKE,;t t
- +s,@DEPDIR@,$DEPDIR,;t t
- +s,@am__include@,$am__include,;t t
- +s,@am__quote@,$am__quote,;t t
- +s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
- +s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
- +s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
- +s,@CCDEPMODE@,$CCDEPMODE,;t t
- +s,@bfd_version@,$bfd_version,;t t
- +s,@bfd_version_string@,$bfd_version_string,;t t
- +s,@AR@,$AR,;t t
- +s,@ac_ct_AR@,$ac_ct_AR,;t t
- +s,@RANLIB@,$RANLIB,;t t
- +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
- +s,@LN_S@,$LN_S,;t t
- +s,@LIBTOOL@,$LIBTOOL,;t t
- +s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
- +s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
- +s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
- +s,@MAINT@,$MAINT,;t t
- +s,@INSTALL_LIBBFD_TRUE@,$INSTALL_LIBBFD_TRUE,;t t
- +s,@INSTALL_LIBBFD_FALSE@,$INSTALL_LIBBFD_FALSE,;t t
- +s,@bfdlibdir@,$bfdlibdir,;t t
- +s,@bfdincludedir@,$bfdincludedir,;t t
- +s,@CPP@,$CPP,;t t
- +s,@EGREP@,$EGREP,;t t
- +s,@ALLOCA@,$ALLOCA,;t t
- +s,@USE_NLS@,$USE_NLS,;t t
- +s,@MSGFMT@,$MSGFMT,;t t
- +s,@GMSGFMT@,$GMSGFMT,;t t
- +s,@XGETTEXT@,$XGETTEXT,;t t
- +s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
- +s,@CATALOGS@,$CATALOGS,;t t
- +s,@CATOBJEXT@,$CATOBJEXT,;t t
- +s,@DATADIRNAME@,$DATADIRNAME,;t t
- +s,@GMOFILES@,$GMOFILES,;t t
- +s,@INSTOBJEXT@,$INSTOBJEXT,;t t
- +s,@INTLDEPS@,$INTLDEPS,;t t
- +s,@INTLLIBS@,$INTLLIBS,;t t
- +s,@INTLOBJS@,$INTLOBJS,;t t
- +s,@POFILES@,$POFILES,;t t
- +s,@POSUB@,$POSUB,;t t
- +s,@INCLUDE_LOCALE_H@,$INCLUDE_LOCALE_H,;t t
- +s,@GT_NO@,$GT_NO,;t t
- +s,@GT_YES@,$GT_YES,;t t
- +s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
- +s,@l@,$l,;t t
- +s,@HDEFINES@,$HDEFINES,;t t
- +s,@BFD_HOST_64BIT_LONG@,$BFD_HOST_64BIT_LONG,;t t
- +s,@BFD_HOST_64_BIT_DEFINED@,$BFD_HOST_64_BIT_DEFINED,;t t
- +s,@BFD_HOST_64_BIT@,$BFD_HOST_64_BIT,;t t
- +s,@BFD_HOST_U_64_BIT@,$BFD_HOST_U_64_BIT,;t t
- +s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
- +s,@EXEEXT_FOR_BUILD@,$EXEEXT_FOR_BUILD,;t t
- +s,@COREFILE@,$COREFILE,;t t
- +s,@COREFLAG@,$COREFLAG,;t t
- +s,@WIN32LDFLAGS@,$WIN32LDFLAGS,;t t
- +s,@WIN32LIBADD@,$WIN32LIBADD,;t t
- +s,@TDEFINES@,$TDEFINES,;t t
- +s,@wordsize@,$wordsize,;t t
- +s,@bfd_libs@,$bfd_libs,;t t
- +s,@all_backends@,$all_backends,;t t
- +s,@bfd_backends@,$bfd_backends,;t t
- +s,@bfd_machines@,$bfd_machines,;t t
- +s,@bfd_default_target_size@,$bfd_default_target_size,;t t
- +s,@tdefaults@,$tdefaults,;t t
- +s,@LIBOBJS@,$LIBOBJS,;t t
- +s,@LTLIBOBJS@,$LTLIBOBJS,;t t
- CEOF
- -EOF
-
- -cat >> $CONFIG_STATUS <<\EOF
- +_ACEOF
-
- -# Split the substitutions into bite-sized pieces for seds with
- -# small command number limits, like on Digital OSF/1 and HP-UX.
- -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
- -ac_file=1 # Number of current file.
- -ac_beg=1 # First line for current file.
- -ac_end=$ac_max_sed_cmds # Line after last line for current file.
- -ac_more_lines=:
- -ac_sed_cmds=""
- -while $ac_more_lines; do
- + cat >>$CONFIG_STATUS <<\_ACEOF
- + # Split the substitutions into bite-sized pieces for seds with
- + # small command number limits, like on Digital OSF/1 and HP-UX.
- + ac_max_sed_lines=48
- + ac_sed_frag=1 # Number of current file.
- + ac_beg=1 # First line for current file.
- + ac_end=$ac_max_sed_lines # Line after last line for current file.
- + ac_more_lines=:
- + ac_sed_cmds=
- + while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- - sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- - if test ! -s conftest.s$ac_file; then
- + if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- - rm -f conftest.s$ac_file
- else
- + # The purpose of the label and of the branching condition is to
- + # speed up the sed processing (if there are no `@' at all, there
- + # is no need to browse any of the substitutions).
- + # These are the two extra sed commands mentioned above.
- + (echo ':t
- + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- - ac_sed_cmds="sed -f conftest.s$ac_file"
- + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- - ac_file=`expr $ac_file + 1`
- + ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- - ac_end=`expr $ac_end + $ac_max_sed_cmds`
- + ac_end=`expr $ac_end + $ac_max_sed_lines`
- fi
- -done
- -if test -z "$ac_sed_cmds"; then
- + done
- + if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- -fi
- -EOF
- -
- -cat >> $CONFIG_STATUS <<EOF
- + fi
- +fi # test -n "$CONFIG_FILES"
-
- -CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h bfdver.h:version.h po/Makefile.in:po/Make-in"}
- -EOF
- -cat >> $CONFIG_STATUS <<\EOF
- -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- +_ACEOF
- +cat >>$CONFIG_STATUS <<\_ACEOF
- +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- - case "$ac_file" in
- - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- - *) ac_file_in="${ac_file}.in" ;;
- - esac
- + case $ac_file in
- + - | *:- | *:-:* ) # input from stdin
- + cat >$tmp/stdin
- + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- + * ) ac_file_in=$ac_file.in ;;
- + esac
- +
- + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- + ac_dir=`(dirname "$ac_file") 2>/dev/null ||
- +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- + X"$ac_file" : 'X\(//\)[^/]' \| \
- + X"$ac_file" : 'X\(//\)$' \| \
- + X"$ac_file" : 'X\(/\)' \| \
- + . : '\(.\)' 2>/dev/null ||
- +echo X"$ac_file" |
- + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- + /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- + /^X\(\/\/\)$/{ s//\1/; q; }
- + /^X\(\/\).*/{ s//\1/; q; }
- + s/.*/./; q'`
- + { if $as_mkdir_p; then
- + mkdir -p "$ac_dir"
- + else
- + as_dir="$ac_dir"
- + as_dirs=
- + while test ! -d "$as_dir"; do
- + as_dirs="$as_dir $as_dirs"
- + as_dir=`(dirname "$as_dir") 2>/dev/null ||
- +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- + X"$as_dir" : 'X\(//\)[^/]' \| \
- + X"$as_dir" : 'X\(//\)$' \| \
- + X"$as_dir" : 'X\(/\)' \| \
- + . : '\(.\)' 2>/dev/null ||
- +echo X"$as_dir" |
- + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- + /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- + /^X\(\/\/\)$/{ s//\1/; q; }
- + /^X\(\/\).*/{ s//\1/; q; }
- + s/.*/./; q'`
- + done
- + test ! -n "$as_dirs" || mkdir $as_dirs
- + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
- +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- + { (exit 1); exit 1; }; }; }
- +
- + ac_builddir=.
-
- - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
- -
- - # Remove last slash and all that follows it. Not all systems have dirname.
- - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- - # The file is in a subdirectory.
- - test ! -d "$ac_dir" && mkdir "$ac_dir"
- - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- +if test "$ac_dir" != .; then
- + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- - else
- - ac_dir_suffix= ac_dots=
- - fi
- + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
- +else
- + ac_dir_suffix= ac_top_builddir=
- +fi
-
- - case "$ac_given_srcdir" in
- - .) srcdir=.
- - if test -z "$ac_dots"; then top_srcdir=.
- - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- +case $srcdir in
- + .) # No --srcdir option. We are building in place.
- + ac_srcdir=.
- + if test -z "$ac_top_builddir"; then
- + ac_top_srcdir=.
- + else
- + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- + fi ;;
- + [\\/]* | ?:[\\/]* ) # Absolute path.
- + ac_srcdir=$srcdir$ac_dir_suffix;
- + ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- - top_srcdir="$ac_dots$ac_given_srcdir" ;;
- - esac
- + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- + ac_top_srcdir=$ac_top_builddir$srcdir ;;
- +esac
- +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
- +# absolute.
- +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
- +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
- +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
- +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
- +
- +
- + case $INSTALL in
- + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- + *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
- + esac
- +
- + if test x"$ac_file" != x-; then
- + { echo "$as_me:$LINENO: creating $ac_file" >&5
- +echo "$as_me: creating $ac_file" >&6;}
- + rm -f "$ac_file"
- + fi
- + # Let's still pretend it is `configure' which instantiates (i.e., don't
- + # use $as_me), people would be surprised to read:
- + # /* config.h. Generated by config.status. */
- + if test x"$ac_file" = x-; then
- + configure_input=
- + else
- + configure_input="$ac_file. "
- + fi
- + configure_input=$configure_input"Generated from `echo $ac_file_in |
- + sed 's,.*/,,'` by configure."
- +
- + # First look for the input files in the build tree, otherwise in the
- + # src tree.
- + ac_file_inputs=`IFS=:
- + for f in $ac_file_in; do
- + case $f in
- + -) echo $tmp/stdin ;;
- + [\\/$]*)
- + # Absolute (can't be DOS-style, as IFS=:)
- + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
- +echo "$as_me: error: cannot find input file: $f" >&2;}
- + { (exit 1); exit 1; }; }
- + echo $f;;
- + *) # Relative
- + if test -f "$f"; then
- + # Build tree
- + echo $f
- + elif test -f "$srcdir/$f"; then
- + # Source tree
- + echo $srcdir/$f
- + else
- + # /dev/null tree
- + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
- +echo "$as_me: error: cannot find input file: $f" >&2;}
- + { (exit 1); exit 1; }; }
- + fi;;
- + esac
- + done` || { (exit 1); exit 1; }
- +_ACEOF
- +cat >>$CONFIG_STATUS <<_ACEOF
- + sed "$ac_vpsub
- +$extrasub
- +_ACEOF
- +cat >>$CONFIG_STATUS <<\_ACEOF
- +:t
- +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
- +s,@configure_input@,$configure_input,;t t
- +s,@srcdir@,$ac_srcdir,;t t
- +s,@abs_srcdir@,$ac_abs_srcdir,;t t
- +s,@top_srcdir@,$ac_top_srcdir,;t t
- +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
- +s,@builddir@,$ac_builddir,;t t
- +s,@abs_builddir@,$ac_abs_builddir,;t t
- +s,@top_builddir@,$ac_top_builddir,;t t
- +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
- +s,@INSTALL@,$ac_INSTALL,;t t
- +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- + rm -f $tmp/stdin
- + if test x"$ac_file" != x-; then
- + mv $tmp/out $ac_file
- + else
- + cat $tmp/out
- + rm -f $tmp/out
- + fi
-
- - case "$ac_given_INSTALL" in
- - [/$]*) INSTALL="$ac_given_INSTALL" ;;
- - *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- - esac
- +done
- +_ACEOF
- +cat >>$CONFIG_STATUS <<\_ACEOF
-
- - echo creating "$ac_file"
- - rm -f "$ac_file"
- - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- - case "$ac_file" in
- - *Makefile*) ac_comsub="1i\\
- -# $configure_input" ;;
- - *) ac_comsub= ;;
- - esac
- -
- - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- - sed -e "$ac_comsub
- -s%@configure_input@%$configure_input%g
- -s%@srcdir@%$srcdir%g
- -s%@top_srcdir@%$top_srcdir%g
- -s%@INSTALL@%$INSTALL%g
- -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
- -fi; done
- -rm -f conftest.s*
- +#
- +# CONFIG_HEADER section.
- +#
-
- # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
- # NAME is the cpp macro being defined and VALUE is the value it is being given.
- #
- # ac_d sets the value in "#define NAME VALUE" lines.
- -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
- -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
- -ac_dC='\3'
- -ac_dD='%g'
- -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
- -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
- -ac_uB='\([ ]\)%\1#\2define\3'
- +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
- +ac_dB='[ ].*$,\1#\2'
- +ac_dC=' '
- +ac_dD=',;t'
- +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
- +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
- +ac_uB='$,\1#\2define\3'
- ac_uC=' '
- -ac_uD='\4%g'
- -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
- -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
- -ac_eB='$%\1#\2define\3'
- -ac_eC=' '
- -ac_eD='%g'
- +ac_uD=',;t'
-
- -if test "${CONFIG_HEADERS+set}" != set; then
- -EOF
- -cat >> $CONFIG_STATUS <<EOF
- - CONFIG_HEADERS="config.h:config.in"
- -EOF
- -cat >> $CONFIG_STATUS <<\EOF
- -fi
- -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
- +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- - case "$ac_file" in
- - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- - *) ac_file_in="${ac_file}.in" ;;
- - esac
- -
- - echo creating $ac_file
- -
- - rm -f conftest.frag conftest.in conftest.out
- - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- - cat $ac_file_inputs > conftest.in
- -
- -EOF
- -
- -# Transform confdefs.h into a sed script conftest.vals that substitutes
- -# the proper values into config.h.in to produce config.h. And first:
- -# Protect against being on the right side of a sed subst in config.status.
- -# Protect against being in an unquoted here document in config.status.
- -rm -f conftest.vals
- -cat > conftest.hdr <<\EOF
- -s/[\\&%]/\\&/g
- -s%[\\$`]%\\&%g
- -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
- -s%ac_d%ac_u%gp
- -s%ac_u%ac_e%gp
- -EOF
- -sed -n -f conftest.hdr confdefs.h > conftest.vals
- -rm -f conftest.hdr
- + case $ac_file in
- + - | *:- | *:-:* ) # input from stdin
- + cat >$tmp/stdin
- + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- + * ) ac_file_in=$ac_file.in ;;
- + esac
- +
- + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
- +echo "$as_me: creating $ac_file" >&6;}
- +
- + # First look for the input files in the build tree, otherwise in the
- + # src tree.
- + ac_file_inputs=`IFS=:
- + for f in $ac_file_in; do
- + case $f in
- + -) echo $tmp/stdin ;;
- + [\\/$]*)
- + # Absolute (can't be DOS-style, as IFS=:)
- + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
- +echo "$as_me: error: cannot find input file: $f" >&2;}
- + { (exit 1); exit 1; }; }
- + echo $f;;
- + *) # Relative
- + if test -f "$f"; then
- + # Build tree
- + echo $f
- + elif test -f "$srcdir/$f"; then
- + # Source tree
- + echo $srcdir/$f
- + else
- + # /dev/null tree
- + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
- +echo "$as_me: error: cannot find input file: $f" >&2;}
- + { (exit 1); exit 1; }; }
- + fi;;
- + esac
- + done` || { (exit 1); exit 1; }
- + # Remove the trailing spaces.
- + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
- +
- +_ACEOF
- +
- +# Transform confdefs.h into two sed scripts, `conftest.defines' and
- +# `conftest.undefs', that substitutes the proper values into
- +# config.h.in to produce config.h. The first handles `#define'
- +# templates, and the second `#undef' templates.
- +# And first: Protect against being on the right side of a sed subst in
- +# config.status. Protect against being in an unquoted here document
- +# in config.status.
- +rm -f conftest.defines conftest.undefs
- +# Using a here document instead of a string reduces the quoting nightmare.
- +# Putting comments in sed scripts is not portable.
- +#
- +# `end' is used to avoid that the second main sed command (meant for
- +# 0-ary CPP macros) applies to n-ary macro definitions.
- +# See the Autoconf documentation for `clear'.
- +cat >confdef2sed.sed <<\_ACEOF
- +s/[\\&,]/\\&/g
- +s,[\\$`],\\&,g
- +t clear
- +: clear
- +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
- +t end
- +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
- +: end
- +_ACEOF
- +# If some macros were called several times there might be several times
- +# the same #defines, which is useless. Nevertheless, we may not want to
- +# sort them, since we want the *last* AC-DEFINE to be honored.
- +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
- +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
- +rm -f confdef2sed.sed
-
- # This sed command replaces #undef with comments. This is necessary, for
- # example, in the case of _POSIX_SOURCE, which is predefined and required
- # on some systems where configure will not decide to define it.
- -cat >> conftest.vals <<\EOF
- -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
- -EOF
- -
- -# Break up conftest.vals because some shells have a limit on
- -# the size of here documents, and old seds have small limits too.
- -
- +cat >>conftest.undefs <<\_ACEOF
- +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
- +_ACEOF
- +
- +# Break up conftest.defines because some shells have a limit on the size
- +# of here documents, and old seds have small limits too (100 cmds).
- +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
- +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
- +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
- +echo ' :' >>$CONFIG_STATUS
- rm -f conftest.tail
- -while :
- +while grep . conftest.defines >/dev/null
- do
- - ac_lines=`grep -c . conftest.vals`
- - # grep -c gives empty output for an empty file on some AIX systems.
- - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- - # Write a limited-size here document to conftest.frag.
- - echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
- - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
- + # Write a limited-size here document to $tmp/defines.sed.
- + echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
- + # Speed up: don't consider the non `#define' lines.
- + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
- + # Work around the forget-to-reset-the-flag bug.
- + echo 't clr' >>$CONFIG_STATUS
- + echo ': clr' >>$CONFIG_STATUS
- + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
- echo 'CEOF
- - sed -f conftest.frag conftest.in > conftest.out
- - rm -f conftest.in
- - mv conftest.out conftest.in
- -' >> $CONFIG_STATUS
- - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- - rm -f conftest.vals
- - mv conftest.tail conftest.vals
- -done
- -rm -f conftest.vals
- -
- -cat >> $CONFIG_STATUS <<\EOF
- - rm -f conftest.frag conftest.h
- - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- - cat conftest.in >> conftest.h
- - rm -f conftest.in
- - if cmp -s $ac_file conftest.h 2>/dev/null; then
- - echo "$ac_file is unchanged"
- - rm -f conftest.h
- - else
- - # Remove last slash and all that follows it. Not all systems have dirname.
- - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- - # The file is in a subdirectory.
- - test ! -d "$ac_dir" && mkdir "$ac_dir"
- - fi
- + sed -f $tmp/defines.sed $tmp/in >$tmp/out
- + rm -f $tmp/in
- + mv $tmp/out $tmp/in
- +' >>$CONFIG_STATUS
- + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
- + rm -f conftest.defines
- + mv conftest.tail conftest.defines
- +done
- +rm -f conftest.defines
- +echo ' fi # grep' >>$CONFIG_STATUS
- +echo >>$CONFIG_STATUS
- +
- +# Break up conftest.undefs because some shells have a limit on the size
- +# of here documents, and old seds have small limits too (100 cmds).
- +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
- +rm -f conftest.tail
- +while grep . conftest.undefs >/dev/null
- +do
- + # Write a limited-size here document to $tmp/undefs.sed.
- + echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
- + # Speed up: don't consider the non `#undef'
- + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
- + # Work around the forget-to-reset-the-flag bug.
- + echo 't clr' >>$CONFIG_STATUS
- + echo ': clr' >>$CONFIG_STATUS
- + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
- + echo 'CEOF
- + sed -f $tmp/undefs.sed $tmp/in >$tmp/out
- + rm -f $tmp/in
- + mv $tmp/out $tmp/in
- +' >>$CONFIG_STATUS
- + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
- + rm -f conftest.undefs
- + mv conftest.tail conftest.undefs
- +done
- +rm -f conftest.undefs
- +
- +cat >>$CONFIG_STATUS <<\_ACEOF
- + # Let's still pretend it is `configure' which instantiates (i.e., don't
- + # use $as_me), people would be surprised to read:
- + # /* config.h. Generated by config.status. */
- + if test x"$ac_file" = x-; then
- + echo "/* Generated by configure. */" >$tmp/config.h
- + else
- + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
- + fi
- + cat $tmp/in >>$tmp/config.h
- + rm -f $tmp/in
- + if test x"$ac_file" != x-; then
- + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
- + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
- +echo "$as_me: $ac_file is unchanged" >&6;}
- + else
- + ac_dir=`(dirname "$ac_file") 2>/dev/null ||
- +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- + X"$ac_file" : 'X\(//\)[^/]' \| \
- + X"$ac_file" : 'X\(//\)$' \| \
- + X"$ac_file" : 'X\(/\)' \| \
- + . : '\(.\)' 2>/dev/null ||
- +echo X"$ac_file" |
- + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- + /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- + /^X\(\/\/\)$/{ s//\1/; q; }
- + /^X\(\/\).*/{ s//\1/; q; }
- + s/.*/./; q'`
- + { if $as_mkdir_p; then
- + mkdir -p "$ac_dir"
- + else
- + as_dir="$ac_dir"
- + as_dirs=
- + while test ! -d "$as_dir"; do
- + as_dirs="$as_dir $as_dirs"
- + as_dir=`(dirname "$as_dir") 2>/dev/null ||
- +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- + X"$as_dir" : 'X\(//\)[^/]' \| \
- + X"$as_dir" : 'X\(//\)$' \| \
- + X"$as_dir" : 'X\(/\)' \| \
- + . : '\(.\)' 2>/dev/null ||
- +echo X"$as_dir" |
- + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- + /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- + /^X\(\/\/\)$/{ s//\1/; q; }
- + /^X\(\/\).*/{ s//\1/; q; }
- + s/.*/./; q'`
- + done
- + test ! -n "$as_dirs" || mkdir $as_dirs
- + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
- +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- + { (exit 1); exit 1; }; }; }
- +
- rm -f $ac_file
- - mv conftest.h $ac_file
- + mv $tmp/config.h $ac_file
- + fi
- + else
- + cat $tmp/config.h
- + rm -f $tmp/config.h
- fi
- -fi; done
- + # Run the commands associated with the file.
- + case $ac_file in
- + config.h ) # update the timestamp
- +echo 'timestamp for config.h:config.in' >"./stamp-h1"
- + ;;
- + esac
- +done
- +_ACEOF
- +cat >>$CONFIG_STATUS <<\_ACEOF
-
- -EOF
- -cat >> $CONFIG_STATUS <<EOF
- +#
- +# CONFIG_COMMANDS section.
- +#
- +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
- + ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
- + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
- + ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
- +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- + X"$ac_dest" : 'X\(//\)[^/]' \| \
- + X"$ac_dest" : 'X\(//\)$' \| \
- + X"$ac_dest" : 'X\(/\)' \| \
- + . : '\(.\)' 2>/dev/null ||
- +echo X"$ac_dest" |
- + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- + /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- + /^X\(\/\/\)$/{ s//\1/; q; }
- + /^X\(\/\).*/{ s//\1/; q; }
- + s/.*/./; q'`
- + ac_builddir=.
-
- +if test "$ac_dir" != .; then
- + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- + # A "../" for each directory in $ac_dir_suffix.
- + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
- +else
- + ac_dir_suffix= ac_top_builddir=
- +fi
-
- -EOF
- -cat >> $CONFIG_STATUS <<\EOF
- -test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
- -sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile
- -exit 0
- -EOF
- +case $srcdir in
- + .) # No --srcdir option. We are building in place.
- + ac_srcdir=.
- + if test -z "$ac_top_builddir"; then
- + ac_top_srcdir=.
- + else
- + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- + fi ;;
- + [\\/]* | ?:[\\/]* ) # Absolute path.
- + ac_srcdir=$srcdir$ac_dir_suffix;
- + ac_top_srcdir=$srcdir ;;
- + *) # Relative path.
- + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- + ac_top_srcdir=$ac_top_builddir$srcdir ;;
- +esac
- +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
- +# absolute.
- +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
- +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
- +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
- +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
- +
- +
- + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
- +echo "$as_me: executing $ac_dest commands" >&6;}
- + case $ac_dest in
- + depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
- + # Strip MF so we end up with the name of the file.
- + mf=`echo "$mf" | sed -e 's/:.*$//'`
- + # Check whether this is an Automake generated Makefile or not.
- + # We used to match only the files named `Makefile.in', but
- + # some people rename them; so instead we look at the file content.
- + # Grep'ing the first line is not enough: some people post-process
- + # each Makefile.in and add a new line on top of each file to say so.
- + # So let's grep whole file.
- + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
- + dirpart=`(dirname "$mf") 2>/dev/null ||
- +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- + X"$mf" : 'X\(//\)[^/]' \| \
- + X"$mf" : 'X\(//\)$' \| \
- + X"$mf" : 'X\(/\)' \| \
- + . : '\(.\)' 2>/dev/null ||
- +echo X"$mf" |
- + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- + /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- + /^X\(\/\/\)$/{ s//\1/; q; }
- + /^X\(\/\).*/{ s//\1/; q; }
- + s/.*/./; q'`
- + else
- + continue
- + fi
- + grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
- + # Extract the definition of DEP_FILES from the Makefile without
- + # running `make'.
- + DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
- + test -z "$DEPDIR" && continue
- + # When using ansi2knr, U may be empty or an underscore; expand it
- + U=`sed -n -e '/^U = / s///p' < "$mf"`
- + test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
- + # We invoke sed twice because it is the simplest approach to
- + # changing $(DEPDIR) to its actual value in the expansion.
- + for file in `sed -n -e '
- + /^DEP_FILES = .*\\\\$/ {
- + s/^DEP_FILES = //
- + :loop
- + s/\\\\$//
- + p
- + n
- + /\\\\$/ b loop
- + p
- + }
- + /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
- + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- + # Make sure the directory exists.
- + test -f "$dirpart/$file" && continue
- + fdir=`(dirname "$file") 2>/dev/null ||
- +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- + X"$file" : 'X\(//\)[^/]' \| \
- + X"$file" : 'X\(//\)$' \| \
- + X"$file" : 'X\(/\)' \| \
- + . : '\(.\)' 2>/dev/null ||
- +echo X"$file" |
- + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- + /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- + /^X\(\/\/\)$/{ s//\1/; q; }
- + /^X\(\/\).*/{ s//\1/; q; }
- + s/.*/./; q'`
- + { if $as_mkdir_p; then
- + mkdir -p $dirpart/$fdir
- + else
- + as_dir=$dirpart/$fdir
- + as_dirs=
- + while test ! -d "$as_dir"; do
- + as_dirs="$as_dir $as_dirs"
- + as_dir=`(dirname "$as_dir") 2>/dev/null ||
- +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- + X"$as_dir" : 'X\(//\)[^/]' \| \
- + X"$as_dir" : 'X\(//\)$' \| \
- + X"$as_dir" : 'X\(/\)' \| \
- + . : '\(.\)' 2>/dev/null ||
- +echo X"$as_dir" |
- + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- + /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- + /^X\(\/\/\)$/{ s//\1/; q; }
- + /^X\(\/\).*/{ s//\1/; q; }
- + s/.*/./; q'`
- + done
- + test ! -n "$as_dirs" || mkdir $as_dirs
- + fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
- +echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
- + { (exit 1); exit 1; }; }; }
- +
- + # echo "creating $dirpart/$file"
- + echo '# dummy' > "$dirpart/$file"
- + done
- +done
- + ;;
- + default ) sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile ;;
- + esac
- +done
- +_ACEOF
- +
- +cat >>$CONFIG_STATUS <<\_ACEOF
- +
- +{ (exit 0); exit 0; }
- +_ACEOF
- chmod +x $CONFIG_STATUS
- -rm -fr confdefs* $ac_clean_files
- -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
- +ac_clean_files=$ac_clean_files_save
- +
- +
- +# configure is writing to config.log, and then calls config.status.
- +# config.status does its own redirection, appending to config.log.
- +# Unfortunately, on DOS this fails, as config.log is still kept open
- +# by configure, so config.status won't be able to write to it; its
- +# output is simply discarded. So we exec the FD to /dev/null,
- +# effectively closing config.log, so it can be properly (re)opened and
- +# appended to by config.status. When coming back to configure, we
- +# need to make the FD available again.
- +if test "$no_create" != yes; then
- + ac_cs_success=:
- + ac_config_status_args=
- + test "$silent" = yes &&
- + ac_config_status_args="$ac_config_status_args --quiet"
- + exec 5>/dev/null
- + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- + exec 5>>config.log
- + # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- + # would make configure fail if this is the last instruction.
- + $ac_cs_success || { (exit 1); exit 1; }
- +fi
-
-
- diff -urNEBb binutils-2.14-orig/bfd/configure.host binutils-2.14/bfd/configure.host
- --- binutils-2.14-orig/bfd/configure.host 2002-12-17 05:17:20.000000000 +0100
- +++ binutils-2.14/bfd/configure.host 2003-12-02 14:09:38.000000000 +0100
- @@ -59,6 +59,7 @@
- mips*-*-riscos*) HDEFINES="-G 4" ;;
-
- m68*-hp-hpux*) HDEFINES=-DHOST_HP300HPUX ;;
- +m68*-*-amigaos*) HDEFINES=-mstackextend ;;
-
- *-*-aix*) HOST_64BIT_TYPE="long long"
- HOST_U_64BIT_TYPE="unsigned long long"
- diff -urNEBb binutils-2.14-orig/bfd/configure.in binutils-2.14/bfd/configure.in
- --- binutils-2.14-orig/bfd/configure.in 2003-06-12 15:25:46.000000000 +0200
- +++ binutils-2.14/bfd/configure.in 2003-12-15 12:05:14.000000000 +0100
- @@ -18,7 +18,7 @@
- bfd_version_string="\"${VERSION}\""
- if test x${is_release} = x; then
- bfd_version_date=`sed -n -e 's/.*DATE //p' < ${srcdir}/version.h`
- - bfd_version_string="\"${VERSION} ${bfd_version_date}\""
- + bfd_version_string="\"${VERSION} ${bfd_version_date} (Amiga, Inc. build 20031201)\""
- fi
- AC_SUBST(bfd_version)
- AC_SUBST(bfd_version_string)
- @@ -544,8 +544,10 @@
- # use one entry per line, even though this leads to long lines.
- a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;;
- a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;;
- + amiga_vec) tb="$tb amigaos.lo amigaoslink.lo" ;;
- aix5coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;;
- aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
- + aout_amiga_vec) tb="$tb aout-amiga.lo aout32.lo";;
- aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;;
- aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;;
- aout_mips_big_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
- @@ -566,6 +568,7 @@
- b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;;
- bfd_efi_app_ia32_vec) tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;;
- bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;;
- + bfd_elf32_amiga_vec) tb="$tb elf32-amiga.lo elf32.lo $elf" ;;
- bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;;
- bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
- bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
- @@ -584,6 +587,7 @@
- bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
- bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
- bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
- + bfd_elf32_i386be_amithlon_vec) tb="$tb elf32-i386-amithlon.lo elf32.lo $elf" ;;
- bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
- bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
- bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
- @@ -605,6 +609,7 @@
- bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
- bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
- bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
- + bfd_elf32_morphos_vec) tb="$tb elf32-morphos.lo elf32.lo $elf";;
- bfd_elf32_msp430_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
- bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
- bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
- diff -urNEBb binutils-2.14-orig/bfd/doc/Makefile.am binutils-2.14/bfd/doc/Makefile.am
- --- binutils-2.14-orig/bfd/doc/Makefile.am 2002-11-18 17:37:54.000000000 +0100
- +++ binutils-2.14/bfd/doc/Makefile.am 2003-12-02 14:09:39.000000000 +0100
- @@ -2,7 +2,7 @@
-
- AUTOMAKE_OPTIONS = cygnus
-
- -DOCFILES = aoutx.texi archive.texi archures.texi \
- +DOCFILES = amiga.texi amigalink.texi aoutx.texi archive.texi archures.texi \
- bfdt.texi cache.texi coffcode.texi \
- core.texi elf.texi elfcode.texi format.texi \
- libbfd.texi bfdwin.texi bfdio.texi \
- @@ -28,6 +28,7 @@
- $(srcdir)/../cache.c $(srcdir)/../coffcode.h \
- $(srcdir)/../corefile.c $(srcdir)/../elf.c \
- $(srcdir)/../elfcode.h $(srcdir)/../format.c \
- + $(srcdir)/../amigaos.c $(srcdir)/../amigaoslink.c \
- $(srcdir)/../libbfd.c $(srcdir)/../opncls.c \
- $(srcdir)/../reloc.c $(srcdir)/../section.c \
- $(srcdir)/../syms.c $(srcdir)/../targets.c \
- @@ -55,14 +56,15 @@
- MKDOC = chew$(EXEEXT_FOR_BUILD)
-
- $(MKDOC): chew.o
- - $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(LOADLIBES) $(LDFLAGS)
- + $(CC_FOR_BUILD) $(H_CFLAGS) $(CFLAGS) -o $(MKDOC) chew.o $(LOADLIBES) $(LDFLAGS)
-
- chew.o: chew.c
- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
-
- protos: libbfd.h libcoff.h bfd.h
-
- -bfd.info bfd.dvi: $(DOCFILES) bfdsumm.texi bfd.texinfo
- +bfd.info bfd.dvi bfd.guide: $(DOCFILES) bfdsumm.texi bfd.texinfo
- +
-
- # We can't replace these rules with an implicit rule, because
- # makes without VPATH support couldn't find the .h files in `..'.
- @@ -208,6 +210,18 @@
- touch s-linker
- linker.texi: s-linker
-
- +s-amiga: $(MKDOC) $(srcdir)/../amigaos.c $(srcdir)/doc.str
- + ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../amigaos.c >amiga.tmp
- + $(srcdir)/../../move-if-change amiga.tmp amiga.texi
- + touch s-amiga
- +amiga.texi: s-amiga
- +
- +s-amigalink: $(MKDOC) $(srcdir)/../amigaoslink.c $(srcdir)/doc.str
- + ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../amigaoslink.c >amigalink.tmp
- + $(srcdir)/../../move-if-change amigalink.tmp amigalink.texi
- + touch s-amigalink
- +amigalink.texi: s-amigalink
- +
- LIBBFD_H_DEP = \
- $(srcdir)/../libbfd-in.h \
- $(srcdir)/../init.c \
- @@ -304,4 +318,4 @@
-
- # We want install to imply install-info as per GNU standards, despite the
- # cygnus option.
- -install: install-info
- +#install: install-info
- diff -urNEBb binutils-2.14-orig/bfd/doc/Makefile.in binutils-2.14/bfd/doc/Makefile.in
- --- binutils-2.14-orig/bfd/doc/Makefile.in 2002-11-18 17:37:54.000000000 +0100
- +++ binutils-2.14/bfd/doc/Makefile.in 2003-12-02 14:09:39.000000000 +0100
- @@ -1,6 +1,8 @@
- -# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
- +# Makefile.in generated by automake 1.7.4 from Makefile.am.
- +# @configure_input@
-
- -# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
- +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- +# Free Software Foundation, Inc.
- # This Makefile.in is free software; the Free Software Foundation
- # gives unlimited permission to copy and/or distribute it,
- # with or without modifications, as long as this notice is preserved.
- @@ -10,30 +12,11 @@
- # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- # PARTICULAR PURPOSE.
-
- -
- -SHELL = @SHELL@
- +@SET_MAKE@
-
- srcdir = @srcdir@
- top_srcdir = @top_srcdir@
- VPATH = @srcdir@
- -prefix = @prefix@
- -exec_prefix = @exec_prefix@
- -
- -bindir = @bindir@
- -sbindir = @sbindir@
- -libexecdir = @libexecdir@
- -datadir = @datadir@
- -sysconfdir = @sysconfdir@
- -sharedstatedir = @sharedstatedir@
- -localstatedir = @localstatedir@
- -libdir = @libdir@
- -infodir = @infodir@
- -mandir = @mandir@
- -includedir = @includedir@
- -oldincludedir = /usr/include
- -
- -DESTDIR =
- -
- pkgdatadir = $(datadir)/@PACKAGE@
- pkglibdir = $(libdir)/@PACKAGE@
- pkgincludedir = $(includedir)/@PACKAGE@
- @@ -37,34 +20,34 @@
- pkgdatadir = $(datadir)/@PACKAGE@
- pkglibdir = $(libdir)/@PACKAGE@
- pkgincludedir = $(includedir)/@PACKAGE@
- -
- top_builddir = ..
-
- -ACLOCAL = @ACLOCAL@
- -AUTOCONF = @AUTOCONF@
- -AUTOMAKE = @AUTOMAKE@
- -AUTOHEADER = @AUTOHEADER@
- -
- +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
- INSTALL = @INSTALL@
- -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
- -INSTALL_DATA = @INSTALL_DATA@
- -INSTALL_SCRIPT = @INSTALL_SCRIPT@
- -transform = @program_transform_name@
- -
- +install_sh_DATA = $(install_sh) -c -m 644
- +install_sh_PROGRAM = $(install_sh) -c
- +install_sh_SCRIPT = $(install_sh) -c
- +INSTALL_HEADER = $(INSTALL_DATA)
- +transform = $(program_transform_name)
- NORMAL_INSTALL = :
- PRE_INSTALL = :
- POST_INSTALL = :
- NORMAL_UNINSTALL = :
- PRE_UNINSTALL = :
- POST_UNINSTALL = :
- -build_alias = @build_alias@
- build_triplet = @build@
- -host_alias = @host_alias@
- host_triplet = @host@
- -target_alias = @target_alias@
- target_triplet = @target@
- +ACLOCAL = @ACLOCAL@
- +ALLOCA = @ALLOCA@
- +AMDEP_FALSE = @AMDEP_FALSE@
- +AMDEP_TRUE = @AMDEP_TRUE@
- +AMTAR = @AMTAR@
- AR = @AR@
- -AS = @AS@
- +AUTOCONF = @AUTOCONF@
- +AUTOHEADER = @AUTOHEADER@
- +AUTOMAKE = @AUTOMAKE@
- +AWK = @AWK@
- BFD_HOST_64BIT_LONG = @BFD_HOST_64BIT_LONG@
- BFD_HOST_64_BIT = @BFD_HOST_64_BIT@
- BFD_HOST_64_BIT_DEFINED = @BFD_HOST_64_BIT_DEFINED@
- @@ -72,39 +55,63 @@
- CATALOGS = @CATALOGS@
- CATOBJEXT = @CATOBJEXT@
- CC = @CC@
- +CCDEPMODE = @CCDEPMODE@
- CC_FOR_BUILD = @CC_FOR_BUILD@
- +CFLAGS = @CFLAGS@
- COREFILE = @COREFILE@
- COREFLAG = @COREFLAG@
- -CXX = @CXX@
- -CXXCPP = @CXXCPP@
- +CPP = @CPP@
- +CPPFLAGS = @CPPFLAGS@
- DATADIRNAME = @DATADIRNAME@
- -DLLTOOL = @DLLTOOL@
- +DEFS = @DEFS@
- +DEPDIR = @DEPDIR@
- +ECHO_C = @ECHO_C@
- +ECHO_N = @ECHO_N@
- +ECHO_T = @ECHO_T@
- +EGREP = @EGREP@
- EXEEXT = @EXEEXT@
- EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
- -GCJ = @GCJ@
- -GCJFLAGS = @GCJFLAGS@
- GMOFILES = @GMOFILES@
- GMSGFMT = @GMSGFMT@
- GT_NO = @GT_NO@
- GT_YES = @GT_YES@
- HDEFINES = @HDEFINES@
- INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
- +INSTALL_DATA = @INSTALL_DATA@
- +INSTALL_LIBBFD_FALSE = @INSTALL_LIBBFD_FALSE@
- +INSTALL_LIBBFD_TRUE = @INSTALL_LIBBFD_TRUE@
- +INSTALL_PROGRAM = @INSTALL_PROGRAM@
- +INSTALL_SCRIPT = @INSTALL_SCRIPT@
- +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
- INSTOBJEXT = @INSTOBJEXT@
- INTLDEPS = @INTLDEPS@
- INTLLIBS = @INTLLIBS@
- INTLOBJS = @INTLOBJS@
- +LDFLAGS = @LDFLAGS@
- +LIBOBJS = @LIBOBJS@
- +LIBS = @LIBS@
- LIBTOOL = @LIBTOOL@
- LN_S = @LN_S@
- +LTLIBOBJS = @LTLIBOBJS@
- MAINT = @MAINT@
- +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
- +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
- MAKEINFO = @MAKEINFO@
- MKINSTALLDIRS = @MKINSTALLDIRS@
- MSGFMT = @MSGFMT@
- -OBJDUMP = @OBJDUMP@
- OBJEXT = @OBJEXT@
- PACKAGE = @PACKAGE@
- +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
- +PACKAGE_NAME = @PACKAGE_NAME@
- +PACKAGE_STRING = @PACKAGE_STRING@
- +PACKAGE_TARNAME = @PACKAGE_TARNAME@
- +PACKAGE_VERSION = @PACKAGE_VERSION@
- +PATH_SEPARATOR = @PATH_SEPARATOR@
- POFILES = @POFILES@
- POSUB = @POSUB@
- RANLIB = @RANLIB@
- +SET_MAKE = @SET_MAKE@
- +SHELL = @SHELL@
- STRIP = @STRIP@
- TDEFINES = @TDEFINES@
- USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
- @@ -113,7 +120,14 @@
- WARN_CFLAGS = @WARN_CFLAGS@
- WIN32LDFLAGS = @WIN32LDFLAGS@
- WIN32LIBADD = @WIN32LIBADD@
- +XGETTEXT = @XGETTEXT@
- +ac_ct_AR = @ac_ct_AR@
- +ac_ct_CC = @ac_ct_CC@
- +ac_ct_RANLIB = @ac_ct_RANLIB@
- +ac_ct_STRIP = @ac_ct_STRIP@
- all_backends = @all_backends@
- +am__include = @am__include@
- +am__quote = @am__quote@
- bfd_backends = @bfd_backends@
- bfd_default_target_size = @bfd_default_target_size@
- bfd_libs = @bfd_libs@
- @@ -122,13 +136,44 @@
- bfd_version_string = @bfd_version_string@
- bfdincludedir = @bfdincludedir@
- bfdlibdir = @bfdlibdir@
- +bindir = @bindir@
- +build = @build@
- +build_alias = @build_alias@
- +build_cpu = @build_cpu@
- +build_os = @build_os@
- +build_vendor = @build_vendor@
- +datadir = @datadir@
- +exec_prefix = @exec_prefix@
- +host = @host@
- +host_alias = @host_alias@
- +host_cpu = @host_cpu@
- +host_os = @host_os@
- +host_vendor = @host_vendor@
- +includedir = @includedir@
- +infodir = @infodir@
- +install_sh = @install_sh@
- l = @l@
- +libdir = @libdir@
- +libexecdir = @libexecdir@
- +localstatedir = @localstatedir@
- +mandir = @mandir@
- +oldincludedir = @oldincludedir@
- +prefix = @prefix@
- +program_transform_name = @program_transform_name@
- +sbindir = @sbindir@
- +sharedstatedir = @sharedstatedir@
- +sysconfdir = @sysconfdir@
- +target = @target@
- +target_alias = @target_alias@
- +target_cpu = @target_cpu@
- +target_os = @target_os@
- +target_vendor = @target_vendor@
- tdefaults = @tdefaults@
- wordsize = @wordsize@
-
- AUTOMAKE_OPTIONS = cygnus
-
- -DOCFILES = aoutx.texi archive.texi archures.texi \
- +DOCFILES = amiga.texi amigalink.texi aoutx.texi archive.texi archures.texi \
- bfdt.texi cache.texi coffcode.texi \
- core.texi elf.texi elfcode.texi format.texi \
- libbfd.texi bfdwin.texi bfdio.texi \
- @@ -156,6 +201,7 @@
- $(srcdir)/../cache.c $(srcdir)/../coffcode.h \
- $(srcdir)/../corefile.c $(srcdir)/../elf.c \
- $(srcdir)/../elfcode.h $(srcdir)/../format.c \
- + $(srcdir)/../amigaos.c $(srcdir)/../amigaoslink.c \
- $(srcdir)/../libbfd.c $(srcdir)/../opncls.c \
- $(srcdir)/../reloc.c $(srcdir)/../section.c \
- $(srcdir)/../syms.c $(srcdir)/../targets.c \
- @@ -241,141 +287,114 @@
- DISTCLEANFILES = bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log
-
- MAINTAINERCLEANFILES = $(DOCFILES)
- +subdir = doc
- +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
- mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
- -CONFIG_HEADER = ../config.h
- +CONFIG_HEADER = $(top_builddir)/config.h
- CONFIG_CLEAN_FILES =
- -TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then echo $(top_srcdir)/../texinfo/util/texi2dvi; else echo texi2dvi; fi`
- +depcomp =
- +am__depfiles_maybe =
- +DIST_SOURCES =
- TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
- +am__TEXINFO_TEX_DIR = $(top_srcdir)/../texinfo
- INFO_DEPS = bfd.info
- DVIS = bfd.dvi
- +PDFS = bfd.pdf
- +PSS = bfd.ps
- TEXINFOS = bfd.texinfo
- -DIST_COMMON = ChangeLog Makefile.am Makefile.in
- -
- -
- -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
- +all: all-am
-
- -TAR = gtar
- -GZIP_ENV = --best
- -all: all-redirect
- .SUFFIXES:
- -.SUFFIXES: .dvi .info .ps .texi .texinfo .txi
- +.SUFFIXES: .dvi .info .pdf .ps .texinfo
- $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- - cd $(top_srcdir) && $(AUTOMAKE) --cygnus doc/Makefile
- -
- -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- - cd $(top_builddir) \
- - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
- -
- + cd $(top_srcdir) && \
- + $(AUTOMAKE) --cygnus doc/Makefile
- +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
- + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-
- -bfd.info: bfd.texinfo
- -bfd.dvi: bfd.texinfo
- +mostlyclean-libtool:
- + -rm -f *.lo
-
- +clean-libtool:
- + -rm -rf .libs _libs
-
- -DVIPS = dvips
- -
- -.texi.info:
- - @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- - $(MAKEINFO) -I $(srcdir) $<
- -
- -.texi.dvi:
- - TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
- - MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
- -
- -.texi:
- - @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- - $(MAKEINFO) -I $(srcdir) $<
- +distclean-libtool:
- + -rm -f libtool
-
- .texinfo.info:
- - @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- - $(MAKEINFO) -I $(srcdir) $<
- -
- -.texinfo:
- - @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- - $(MAKEINFO) -I $(srcdir) $<
- + @rm -f $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]
- + $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
- + -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
-
- .texinfo.dvi:
- - TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
- - MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
- + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
- + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- + $(TEXI2DVI) `test -f '$<' || echo '$(srcdir)/'`$<
- +
- +.texinfo.pdf:
- + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
- + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- + $(TEXI2PDF) `test -f '$<' || echo '$(srcdir)/'`$<
- +bfd.info: bfd.texinfo
- +bfd.dvi: bfd.texinfo
- +bfd.pdf: bfd.texinfo
-
- -.txi.info:
- - @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- - $(MAKEINFO) -I $(srcdir) $<
- -
- -.txi.dvi:
- - TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
- - MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
- -
- -.txi:
- - @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- - $(MAKEINFO) -I $(srcdir) $<
- -.dvi.ps:
- - $(DVIPS) $< -o $@
- +TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then \
- + echo $(top_srcdir)/../texinfo/util/texi2dvi; \
- + else \
- + echo texi2dvi; \
- + fi`
-
- -install-info-am: $(INFO_DEPS)
- - @$(NORMAL_INSTALL)
- - $(mkinstalldirs) $(DESTDIR)$(infodir)
- - @list='$(INFO_DEPS)'; \
- - for file in $$list; do \
- - if test -f $$file; then d=.; else d=$(srcdir); fi; \
- - for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
- - if test -f $$d/$$ifile; then \
- - echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
- - $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
- - else : ; fi; \
- - done; \
- - done
- - @$(POST_INSTALL)
- - @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
- - list='$(INFO_DEPS)'; \
- - for file in $$list; do \
- - echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
- - install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
- - done; \
- - else : ; fi
- +TEXI2PDF = $(TEXI2DVI) --pdf --batch
- +DVIPS = dvips
- +.dvi.ps:
- + $(DVIPS) -o $@ $<
-
- -uninstall-info:
- +uninstall-info-am:
- $(PRE_UNINSTALL)
- - @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
- - ii=yes; \
- - else ii=; fi; \
- + @if (install-info --version && \
- + install-info --version | grep -i -v debian) >/dev/null 2>&1; then \
- list='$(INFO_DEPS)'; \
- for file in $$list; do \
- - test -z "$$ii" \
- - || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
- - done
- + relfile=`echo "$$file" | sed 's|^.*/||'`; \
- + echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile"; \
- + install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile; \
- + done; \
- + else :; fi
- @$(NORMAL_UNINSTALL)
- - list='$(INFO_DEPS)'; \
- + @list='$(INFO_DEPS)'; \
- for file in $$list; do \
- - (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
- + relfile=`echo "$$file" | sed 's|^.*/||'`; \
- + relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
- + (if cd $(DESTDIR)$(infodir); then \
- + echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \
- + rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
- + else :; fi); \
- done
-
- dist-info: $(INFO_DEPS)
- list='$(INFO_DEPS)'; \
- for base in $$list; do \
- if test -f $$base; then d=.; else d=$(srcdir); fi; \
- - for file in `cd $$d && eval echo $$base*`; do \
- - test -f $(distdir)/$$file \
- - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- - || cp -p $$d/$$file $(distdir)/$$file; \
- + for file in $$d/$$base*; do \
- + relfile=`expr "$$file" : "$$d/\(.*\)"`; \
- + test -f $(distdir)/$$relfile || \
- + cp -p $$file $(distdir)/$$relfile; \
- done; \
- done
-
- mostlyclean-aminfo:
- - -rm -f bfd.aux bfd.cp bfd.cps bfd.dvi bfd.fn bfd.fns bfd.ky bfd.kys \
- - bfd.ps bfd.log bfd.pg bfd.toc bfd.tp bfd.tps bfd.vr bfd.vrs \
- - bfd.op bfd.tr bfd.cv bfd.cn
- -
- -clean-aminfo:
- -
- -distclean-aminfo:
- + -rm -f bfd.aux bfd.cp bfd.cps bfd.fn bfd.ky bfd.kys bfd.log bfd.pg bfd.pgs \
- + bfd.tmp bfd.toc bfd.tp bfd.tps bfd.vr bfd.vrs bfd.dvi bfd.pdf \
- + bfd.ps
-
- maintainer-clean-aminfo:
- - for i in $(INFO_DEPS); do \
- - rm -f $$i; \
- - if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
- - rm -f $$i-[0-9]*; \
- - fi; \
- + @list='$(INFO_DEPS)'; for i in $$list; do \
- + i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
- + echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
- + rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
- done
- +
- clean-info: mostlyclean-aminfo
- tags: TAGS
- TAGS:
- @@ -380,51 +399,29 @@
- tags: TAGS
- TAGS:
-
- +ctags: CTAGS
- +CTAGS:
-
- -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
- -
- -subdir = doc
- -
- -distdir: $(DISTFILES)
- - @for file in $(DISTFILES); do \
- - if test -f $$file; then d=.; else d=$(srcdir); fi; \
- - if test -d $$d/$$file; then \
- - cp -pr $$d/$$file $(distdir)/$$file; \
- - else \
- - test -f $(distdir)/$$file \
- - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- - || cp -p $$d/$$file $(distdir)/$$file || :; \
- - fi; \
- - done
- - $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
- -info-am: $(INFO_DEPS)
- -info: info-am
- -dvi-am: $(DVIS)
- -dvi: dvi-am
- check-am:
- check: check-am
- -installcheck-am:
- -installcheck: installcheck-am
- -install-info-am:
- -install-info: install-info-am
- -install-exec-am:
- -install-exec: install-exec-am
- +all-am: Makefile
-
- -install-data-am:
- -install-data: install-data-am
- +installdirs:
-
- -install-am: all-am
- - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
- install: install-am
- -uninstall-am:
- +install-exec: install-exec-am
- +install-data: install-data-am
- uninstall: uninstall-am
- -all-am: Makefile
- -all-redirect: all-am
- -install-strip:
- - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
- -installdirs:
-
- +install-am: all-am
- + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
- +installcheck: installcheck-am
- +install-strip:
- + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- + INSTALL_STRIP_FLAG=-s \
- + `test -z '$(STRIP)' || \
- + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
- mostlyclean-generic:
- -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
-
- @@ -433,50 +430,104 @@
-
- distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- - -rm -f config.cache config.log stamp-h stamp-h[0-9]*
- -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
-
- maintainer-clean-generic:
- + @echo "This command is intended for maintainers to use"
- + @echo "it deletes files that may require special tools to rebuild."
- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
- -mostlyclean-am: mostlyclean-aminfo mostlyclean-generic
- +clean: clean-am
-
- -mostlyclean: mostlyclean-am
- +clean-am: clean-generic clean-libtool mostlyclean-am
-
- -clean-am: clean-aminfo clean-generic mostlyclean-am
- +distclean: distclean-am
-
- -clean: clean-am
- +distclean-am: clean-am distclean-generic distclean-libtool
-
- -distclean-am: distclean-aminfo distclean-generic clean-am
- - -rm -f libtool
- +dvi: dvi-am
-
- -distclean: distclean-am
- +dvi-am: $(DVIS)
-
- -maintainer-clean-am: maintainer-clean-aminfo maintainer-clean-generic \
- - distclean-am
- - @echo "This command is intended for maintainers to use;"
- - @echo "it deletes files that may require special tools to rebuild."
- +info: info-am
- +
- +info-am: $(INFO_DEPS)
- +
- +install-data-am:
- +
- +install-exec-am:
- +
- +install-info:
- +
- +install-info-am: $(INFO_DEPS)
- + @$(NORMAL_INSTALL)
- + $(mkinstalldirs) $(DESTDIR)$(infodir)
- + @list='$(INFO_DEPS)'; \
- + for file in $$list; do \
- + if test -f $$file; then d=.; else d=$(srcdir); fi; \
- + file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
- + for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
- + $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
- + if test -f $$ifile; then \
- + relfile=`echo "$$ifile" | sed 's|^.*/||'`; \
- + echo " $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile"; \
- + $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile; \
- + else : ; fi; \
- + done; \
- + done
- + @$(POST_INSTALL)
- + @if (install-info --version && \
- + install-info --version | grep -i -v debian) >/dev/null 2>&1; then \
- + list='$(INFO_DEPS)'; \
- + for file in $$list; do \
- + relfile=`echo "$$file" | sed 's|^.*/||'`; \
- + echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile";\
- + install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile || :;\
- + done; \
- + else : ; fi
- +install-man:
- +
- +installcheck-am:
-
- maintainer-clean: maintainer-clean-am
-
- -.PHONY: install-info-am uninstall-info mostlyclean-aminfo \
- -distclean-aminfo clean-aminfo maintainer-clean-aminfo tags distdir \
- -info-am info dvi-am dvi check check-am installcheck-am installcheck \
- -install-info-am install-info install-exec-am install-exec \
- -install-data-am install-data install-am install uninstall-am uninstall \
- -all-redirect all-am all installdirs mostlyclean-generic \
- -distclean-generic clean-generic maintainer-clean-generic clean \
- -mostlyclean distclean maintainer-clean
- +maintainer-clean-am: distclean-am maintainer-clean-aminfo \
- + maintainer-clean-generic
- +
- +mostlyclean: mostlyclean-am
- +
- +mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \
- + mostlyclean-libtool
- +
- +pdf: pdf-am
- +
- +pdf-am: $(PDFS)
- +
- +ps: ps-am
- +
- +ps-am: $(PSS)
- +
- +uninstall-am:
- +
- +.PHONY: all all-am check check-am clean clean-generic clean-info \
- + clean-libtool dist-info distclean distclean-generic \
- + distclean-libtool dvi dvi-am info info-am install install-am \
- + install-data install-data-am install-exec install-exec-am \
- + install-info install-info-am install-man install-strip \
- + installcheck installcheck-am installdirs maintainer-clean \
- + maintainer-clean-aminfo maintainer-clean-generic mostlyclean \
- + mostlyclean-aminfo mostlyclean-generic mostlyclean-libtool pdf \
- + pdf-am ps ps-am uninstall uninstall-am uninstall-info-am
-
-
- $(MKDOC): chew.o
- - $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(LOADLIBES) $(LDFLAGS)
- + $(CC_FOR_BUILD) $(H_CFLAGS) $(CFLAGS) -o $(MKDOC) chew.o $(LOADLIBES) $(LDFLAGS)
-
- chew.o: chew.c
- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
-
- protos: libbfd.h libcoff.h bfd.h
-
- -bfd.info bfd.dvi: $(DOCFILES) bfdsumm.texi bfd.texinfo
- +bfd.info bfd.dvi bfd.guide: $(DOCFILES) bfdsumm.texi bfd.texinfo
-
- # We can't replace these rules with an implicit rule, because
- # makes without VPATH support couldn't find the .h files in `..'.
- @@ -622,6 +673,18 @@
- touch s-linker
- linker.texi: s-linker
-
- +s-amiga: $(MKDOC) $(srcdir)/../amigaos.c $(srcdir)/doc.str
- + ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../amigaos.c >amiga.tmp
- + $(srcdir)/../../move-if-change amiga.tmp amiga.texi
- + touch s-amiga
- +amiga.texi: s-amiga
- +
- +s-amigalink: $(MKDOC) $(srcdir)/../amigaoslink.c $(srcdir)/doc.str
- + ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../amigaoslink.c >amigalink.tmp
- + $(srcdir)/../../move-if-change amigalink.tmp amigalink.texi
- + touch s-amigalink
- +amigalink.texi: s-amigalink
- +
- libbfd.h: $(LIBBFD_H_DEP)
- echo "$(LIBBFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
- for file in $(LIBBFD_H_DEP); do \
- @@ -664,8 +727,7 @@
-
- # We want install to imply install-info as per GNU standards, despite the
- # cygnus option.
- -install: install-info
- -
- +#install: install-info
- # Tell versions [3.59,3.63) of GNU make to not export all variables.
- # Otherwise a system limit (for SysV at least) may be exceeded.
- .NOEXPORT:
- diff -urNEBb binutils-2.14-orig/bfd/doc/bfd.texinfo binutils-2.14/bfd/doc/bfd.texinfo
- --- binutils-2.14-orig/bfd/doc/bfd.texinfo 2003-02-13 12:26:40.000000000 +0100
- +++ binutils-2.14/bfd/doc/bfd.texinfo 2003-12-02 14:09:39.000000000 +0100
- @@ -299,6 +299,7 @@
- * aout :: a.out backends
- * coff :: coff backends
- * elf :: elf backends
- +* amiga :: amigaos backend
- * mmo :: mmo backend
- @ignore
- * oasys :: oasys backends
- @@ -315,12 +316,16 @@
- @node coff, elf, aout, BFD back ends
- @include coffcode.texi
-
- -@node elf, mmo, coff, BFD back ends
- +@node elf, amiga, coff, BFD back ends
- @include elf.texi
- @c Leave this out until the file has some actual contents...
- @c @include elfcode.texi
-
- -@node mmo, , elf, BFD back ends
- +@node amiga, mmo, elf, BFD back ends
- +@include amiga.texi
- +@include amigalink.texi
- +
- +@node mmo, , amiga, BFD back ends
- @include mmo.texi
-
- @node GNU Free Documentation License, Index, BFD back ends, Top
- diff -urNEBb binutils-2.14-orig/bfd/elf32-amiga.c binutils-2.14/bfd/elf32-amiga.c
- --- binutils-2.14-orig/bfd/elf32-amiga.c 1970-01-01 01:00:00.000000000 +0100
- +++ binutils-2.14/bfd/elf32-amiga.c 2003-12-02 14:09:38.000000000 +0100
- @@ -0,0 +1,3844 @@
- +/* PowerPC-specific support for 32-bit ELF
- + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
- + Free Software Foundation, Inc.
- + Written by Ian Lance Taylor, Cygnus Support.
- +
- +This file is part of BFD, the Binary File Descriptor library.
- +
- +This program is free software; you can redistribute it and/or modify
- +it under the terms of the GNU General Public License as published by
- +the Free Software Foundation; either version 2 of the License, or
- +(at your option) any later version.
- +
- +This program is distributed in the hope that it will be useful,
- +but WITHOUT ANY WARRANTY; without even the implied warranty of
- +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +GNU General Public License for more details.
- +
- +You should have received a copy of the GNU General Public License
- +along with this program; if not, write to the Free Software
- +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
- +
- +/* This file is based on a preliminary PowerPC ELF ABI. The
- + information may not match the final PowerPC ELF ABI. It includes
- + suggestions from the in-progress Embedded PowerPC ABI, and that
- + information may also not match. */
- +
- +#include "bfd.h"
- +#include "sysdep.h"
- +#include "bfdlink.h"
- +#include "libbfd.h"
- +#include "elf-bfd.h"
- +#include "elf/ppc.h"
- +
- +#define USE_RELA /* we want RELA relocations, not REL */
- +
- +static reloc_howto_type *ppc_elf_reloc_type_lookup
- + PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
- +static void ppc_elf_info_to_howto
- + PARAMS ((bfd *abfd, arelent *cache_ptr, Elf32_Internal_Rela *dst));
- +static void ppc_elf_howto_init PARAMS ((void));
- +static int ppc_elf_sort_rela PARAMS ((const PTR, const PTR));
- +static boolean ppc_elf_relax_section
- + PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *));
- +static bfd_reloc_status_type ppc_elf_addr16_ha_reloc
- + PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
- +static boolean ppc_elf_object_p PARAMS ((bfd *));
- +static boolean ppc_elf_set_private_flags PARAMS ((bfd *, flagword));
- +static boolean ppc_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *));
- +
- +static int ppc_elf_additional_program_headers PARAMS ((bfd *));
- +static boolean ppc_elf_modify_segment_map PARAMS ((bfd *));
- +
- +static asection *ppc_elf_create_got
- + PARAMS ((bfd *, struct bfd_link_info *));
- +static boolean ppc_elf_create_dynamic_sections
- + PARAMS ((bfd *, struct bfd_link_info *));
- +
- +static boolean ppc_elf_section_from_shdr PARAMS ((bfd *,
- + Elf32_Internal_Shdr *,
- + const char *));
- +static boolean ppc_elf_fake_sections
- + PARAMS ((bfd *, Elf32_Internal_Shdr *, asection *));
- +
- +static elf_linker_section_t *ppc_elf_create_linker_section
- + PARAMS ((bfd *abfd,
- + struct bfd_link_info *info,
- + enum elf_linker_section_enum));
- +
- +static boolean ppc_elf_check_relocs PARAMS ((bfd *,
- + struct bfd_link_info *,
- + asection *,
- + const Elf_Internal_Rela *));
- +
- +static asection * ppc_elf_gc_mark_hook PARAMS ((asection *sec,
- + struct bfd_link_info *info,
- + Elf_Internal_Rela *rel,
- + struct elf_link_hash_entry *h,
- + Elf_Internal_Sym *sym));
- +
- +static boolean ppc_elf_gc_sweep_hook PARAMS ((bfd *abfd,
- + struct bfd_link_info *info,
- + asection *sec,
- + const Elf_Internal_Rela *relocs));
- +
- +static boolean ppc_elf_adjust_dynamic_symbol PARAMS ((struct bfd_link_info *,
- + struct elf_link_hash_entry *));
- +
- +static boolean ppc_elf_size_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *));
- +
- +static boolean ppc_elf_relocate_section PARAMS ((bfd *,
- + struct bfd_link_info *info,
- + bfd *,
- + asection *,
- + bfd_byte *,
- + Elf_Internal_Rela *relocs,
- + Elf_Internal_Sym *local_syms,
- + asection **));
- +
- +static boolean ppc_elf_add_symbol_hook PARAMS ((bfd *,
- + struct bfd_link_info *,
- + const Elf_Internal_Sym *,
- + const char **,
- + flagword *,
- + asection **,
- + bfd_vma *));
- +
- +static boolean ppc_elf_finish_dynamic_symbol PARAMS ((bfd *,
- + struct bfd_link_info *,
- + struct elf_link_hash_entry *,
- + Elf_Internal_Sym *));
- +
- +static boolean ppc_elf_finish_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *));
- +static enum elf_reloc_type_class ppc_elf_reloc_type_class
- + PARAMS ((const Elf_Internal_Rela *));
- +static boolean ppc_elf_grok_prstatus
- + PARAMS ((bfd *abfd, Elf_Internal_Note *note));
- +static boolean ppc_elf_grok_psinfo
- + PARAMS ((bfd *abfd, Elf_Internal_Note *note));
- +
- +#define BRANCH_PREDICT_BIT 0x200000 /* branch prediction bit for branch taken relocs */
- +#define RA_REGISTER_MASK 0x001f0000 /* mask to set RA in memory instructions */
- +#define RA_REGISTER_SHIFT 16 /* value to shift register by to insert RA */
- +
- +/* The name of the dynamic interpreter. This is put in the .interp
- + section. */
- +
- +#define ELF_DYNAMIC_INTERPRETER "sys:libs/runtime-linker"
- +
- +/* The size in bytes of an entry in the procedure linkage table. */
- +#define PLT_ENTRY_SIZE 12
- +/* The initial size of the plt reserved for the dynamic linker. */
- +#define PLT_INITIAL_ENTRY_SIZE 72
- +/* The size of the gap between entries in the PLT. */
- +#define PLT_SLOT_SIZE 8
- +/* The number of single-slot PLT entries (the rest use two slots). */
- +#define PLT_NUM_SINGLE_ENTRIES 8192
- +
- +/* Will references to this symbol always reference the symbol
- + in this object? */
- +#define SYMBOL_REFERENCES_LOCAL(INFO, H) \
- + ((! INFO->shared \
- + || INFO->symbolic \
- + || H->dynindx == -1 \
- + || ELF_ST_VISIBILITY (H->other) == STV_INTERNAL \
- + || ELF_ST_VISIBILITY (H->other) == STV_HIDDEN) \
- + && (H->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
- +
- +/* Will _calls_ to this symbol always call the version in this object? */
- +#define SYMBOL_CALLS_LOCAL(INFO, H) \
- + ((! INFO->shared \
- + || INFO->symbolic \
- + || H->dynindx == -1 \
- + || ELF_ST_VISIBILITY (H->other) != STV_DEFAULT) \
- + && (H->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
- +
- +static reloc_howto_type *ppc_elf_howto_table[(int) R_PPC_max];
- +
- +static reloc_howto_type ppc_elf_howto_raw[] = {
- + /* This reloc does nothing. */
- + HOWTO (R_PPC_NONE, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_NONE", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* A standard 32 bit relocation. */
- + HOWTO (R_PPC_ADDR32, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_ADDR32", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffffffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* An absolute 26 bit branch; the lower two bits must be zero.
- + FIXME: we don't check that, we just clear them. */
- + HOWTO (R_PPC_ADDR24, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 26, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_ADDR24", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0x3fffffc, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* A standard 16 bit relocation. */
- + HOWTO (R_PPC_ADDR16, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_ADDR16", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* A 16 bit relocation without overflow. */
- + HOWTO (R_PPC_ADDR16_LO, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont,/* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_ADDR16_LO", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* The high order 16 bits of an address. */
- + HOWTO (R_PPC_ADDR16_HI, /* type */
- + 16, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_ADDR16_HI", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* The high order 16 bits of an address, plus 1 if the contents of
- + the low 16 bits, treated as a signed number, is negative. */
- + HOWTO (R_PPC_ADDR16_HA, /* type */
- + 16, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont, /* complain_on_overflow */
- + ppc_elf_addr16_ha_reloc, /* special_function */
- + "R_PPC_ADDR16_HA", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* An absolute 16 bit branch; the lower two bits must be zero.
- + FIXME: we don't check that, we just clear them. */
- + HOWTO (R_PPC_ADDR14, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_ADDR14", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xfffc, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* An absolute 16 bit branch, for which bit 10 should be set to
- + indicate that the branch is expected to be taken. The lower two
- + bits must be zero. */
- + HOWTO (R_PPC_ADDR14_BRTAKEN, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_ADDR14_BRTAKEN",/* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xfffc, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* An absolute 16 bit branch, for which bit 10 should be set to
- + indicate that the branch is not expected to be taken. The lower
- + two bits must be zero. */
- + HOWTO (R_PPC_ADDR14_BRNTAKEN, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_ADDR14_BRNTAKEN",/* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xfffc, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* A relative 26 bit branch; the lower two bits must be zero. */
- + HOWTO (R_PPC_REL24, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 26, /* bitsize */
- + true, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_REL24", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0x3fffffc, /* dst_mask */
- + true), /* pcrel_offset */
- +
- + /* A relative 16 bit branch; the lower two bits must be zero. */
- + HOWTO (R_PPC_REL14, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + true, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_REL14", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xfffc, /* dst_mask */
- + true), /* pcrel_offset */
- +
- + /* A relative 16 bit branch. Bit 10 should be set to indicate that
- + the branch is expected to be taken. The lower two bits must be
- + zero. */
- + HOWTO (R_PPC_REL14_BRTAKEN, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + true, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_REL14_BRTAKEN", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xfffc, /* dst_mask */
- + true), /* pcrel_offset */
- +
- + /* A relative 16 bit branch. Bit 10 should be set to indicate that
- + the branch is not expected to be taken. The lower two bits must
- + be zero. */
- + HOWTO (R_PPC_REL14_BRNTAKEN, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + true, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_REL14_BRNTAKEN",/* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xfffc, /* dst_mask */
- + true), /* pcrel_offset */
- +
- + /* Like R_PPC_ADDR16, but referring to the GOT table entry for the
- + symbol. */
- + HOWTO (R_PPC_GOT16, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_GOT16", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Like R_PPC_ADDR16_LO, but referring to the GOT table entry for
- + the symbol. */
- + HOWTO (R_PPC_GOT16_LO, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_GOT16_LO", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Like R_PPC_ADDR16_HI, but referring to the GOT table entry for
- + the symbol. */
- + HOWTO (R_PPC_GOT16_HI, /* type */
- + 16, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_GOT16_HI", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Like R_PPC_ADDR16_HA, but referring to the GOT table entry for
- + the symbol. */
- + HOWTO (R_PPC_GOT16_HA, /* type */
- + 16, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + ppc_elf_addr16_ha_reloc, /* special_function */
- + "R_PPC_GOT16_HA", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Like R_PPC_REL24, but referring to the procedure linkage table
- + entry for the symbol. */
- + HOWTO (R_PPC_PLTREL24, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 26, /* bitsize */
- + true, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_PLTREL24", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0x3fffffc, /* dst_mask */
- + true), /* pcrel_offset */
- +
- + /* This is used only by the dynamic linker. The symbol should exist
- + both in the object being run and in some shared library. The
- + dynamic linker copies the data addressed by the symbol from the
- + shared library into the object, because the object being
- + run has to have the data at some particular address. */
- + HOWTO (R_PPC_COPY, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_COPY", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Like R_PPC_ADDR32, but used when setting global offset table
- + entries. */
- + HOWTO (R_PPC_GLOB_DAT, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_GLOB_DAT", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffffffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Marks a procedure linkage table entry for a symbol. */
- + HOWTO (R_PPC_JMP_SLOT, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_JMP_SLOT", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Used only by the dynamic linker. When the object is run, this
- + longword is set to the load address of the object, plus the
- + addend. */
- + HOWTO (R_PPC_RELATIVE, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_RELATIVE", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffffffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Like R_PPC_REL24, but uses the value of the symbol within the
- + object rather than the final value. Normally used for
- + _GLOBAL_OFFSET_TABLE_. */
- + HOWTO (R_PPC_LOCAL24PC, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 26, /* bitsize */
- + true, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_LOCAL24PC", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0x3fffffc, /* dst_mask */
- + true), /* pcrel_offset */
- +
- + /* Like R_PPC_ADDR32, but may be unaligned. */
- + HOWTO (R_PPC_UADDR32, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_UADDR32", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffffffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Like R_PPC_ADDR16, but may be unaligned. */
- + HOWTO (R_PPC_UADDR16, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_UADDR16", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* 32-bit PC relative */
- + HOWTO (R_PPC_REL32, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + true, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_REL32", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffffffff, /* dst_mask */
- + true), /* pcrel_offset */
- +
- + /* 32-bit relocation to the symbol's procedure linkage table.
- + FIXME: not supported. */
- + HOWTO (R_PPC_PLT32, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_PLT32", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* 32-bit PC relative relocation to the symbol's procedure linkage table.
- + FIXME: not supported. */
- + HOWTO (R_PPC_PLTREL32, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + true, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_PLTREL32", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0, /* dst_mask */
- + true), /* pcrel_offset */
- +
- + /* Like R_PPC_ADDR16_LO, but referring to the PLT table entry for
- + the symbol. */
- + HOWTO (R_PPC_PLT16_LO, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_PLT16_LO", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Like R_PPC_ADDR16_HI, but referring to the PLT table entry for
- + the symbol. */
- + HOWTO (R_PPC_PLT16_HI, /* type */
- + 16, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_PLT16_HI", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Like R_PPC_ADDR16_HA, but referring to the PLT table entry for
- + the symbol. */
- + HOWTO (R_PPC_PLT16_HA, /* type */
- + 16, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + ppc_elf_addr16_ha_reloc, /* special_function */
- + "R_PPC_PLT16_HA", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* A sign-extended 16 bit value relative to _SDA_BASE_, for use with
- + small data items. */
- + HOWTO (R_PPC_SDAREL16, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_SDAREL16", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* 16-bit section relative relocation. */
- + HOWTO (R_PPC_SECTOFF, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_SECTOFF", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* 16-bit lower half section relative relocation. */
- + HOWTO (R_PPC_SECTOFF_LO, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_SECTOFF_LO", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* 16-bit upper half section relative relocation. */
- + HOWTO (R_PPC_SECTOFF_HI, /* type */
- + 16, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_SECTOFF_HI", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* 16-bit upper half adjusted section relative relocation. */
- + HOWTO (R_PPC_SECTOFF_HA, /* type */
- + 16, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + ppc_elf_addr16_ha_reloc, /* special_function */
- + "R_PPC_SECTOFF_HA", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* The remaining relocs are from the Embedded ELF ABI, and are not
- + in the SVR4 ELF ABI. */
- +
- + /* 32 bit value resulting from the addend minus the symbol */
- + HOWTO (R_PPC_EMB_NADDR32, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_EMB_NADDR32", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffffffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* 16 bit value resulting from the addend minus the symbol */
- + HOWTO (R_PPC_EMB_NADDR16, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_EMB_NADDR16", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* 16 bit value resulting from the addend minus the symbol */
- + HOWTO (R_PPC_EMB_NADDR16_LO, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont,/* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_EMB_ADDR16_LO", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* The high order 16 bits of the addend minus the symbol */
- + HOWTO (R_PPC_EMB_NADDR16_HI, /* type */
- + 16, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_EMB_NADDR16_HI", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* The high order 16 bits of the result of the addend minus the address,
- + plus 1 if the contents of the low 16 bits, treated as a signed number,
- + is negative. */
- + HOWTO (R_PPC_EMB_NADDR16_HA, /* type */
- + 16, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont, /* complain_on_overflow */
- + ppc_elf_addr16_ha_reloc, /* special_function */
- + "R_PPC_EMB_NADDR16_HA", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* 16 bit value resulting from allocating a 4 byte word to hold an
- + address in the .sdata section, and returning the offset from
- + _SDA_BASE_ for that relocation */
- + HOWTO (R_PPC_EMB_SDAI16, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_EMB_SDAI16", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* 16 bit value resulting from allocating a 4 byte word to hold an
- + address in the .sdata2 section, and returning the offset from
- + _SDA2_BASE_ for that relocation */
- + HOWTO (R_PPC_EMB_SDA2I16, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_EMB_SDA2I16", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* A sign-extended 16 bit value relative to _SDA2_BASE_, for use with
- + small data items. */
- + HOWTO (R_PPC_EMB_SDA2REL, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_EMB_SDA2REL", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Relocate against either _SDA_BASE_ or _SDA2_BASE_, filling in the 16 bit
- + signed offset from the appropriate base, and filling in the register
- + field with the appropriate register (0, 2, or 13). */
- + HOWTO (R_PPC_EMB_SDA21, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_EMB_SDA21", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Relocation not handled: R_PPC_EMB_MRKREF */
- + /* Relocation not handled: R_PPC_EMB_RELSEC16 */
- + /* Relocation not handled: R_PPC_EMB_RELST_LO */
- + /* Relocation not handled: R_PPC_EMB_RELST_HI */
- + /* Relocation not handled: R_PPC_EMB_RELST_HA */
- + /* Relocation not handled: R_PPC_EMB_BIT_FLD */
- +
- + /* PC relative relocation against either _SDA_BASE_ or _SDA2_BASE_, filling
- + in the 16 bit signed offset from the appropriate base, and filling in the
- + register field with the appropriate register (0, 2, or 13). */
- + HOWTO (R_PPC_EMB_RELSDA, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + true, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_EMB_RELSDA", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* GNU extension to record C++ vtable hierarchy */
- + HOWTO (R_PPC_GNU_VTINHERIT, /* type */
- + 0, /* rightshift */
- + 0, /* size (0 = byte, 1 = short, 2 = long) */
- + 0, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont, /* complain_on_overflow */
- + NULL, /* special_function */
- + "R_PPC_GNU_VTINHERIT", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* GNU extension to record C++ vtable member usage */
- + HOWTO (R_PPC_GNU_VTENTRY, /* type */
- + 0, /* rightshift */
- + 0, /* size (0 = byte, 1 = short, 2 = long) */
- + 0, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont, /* complain_on_overflow */
- + NULL, /* special_function */
- + "R_PPC_GNU_VTENTRY", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Phony reloc to handle AIX style TOC entries */
- + HOWTO (R_PPC_TOC16, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_TOC16", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +};
- +
- +/* Initialize the ppc_elf_howto_table, so that linear accesses can be done. */
- +
- +static void
- +ppc_elf_howto_init ()
- +{
- + unsigned int i, type;
- +
- + for (i = 0; i < sizeof (ppc_elf_howto_raw) / sizeof (ppc_elf_howto_raw[0]); i++)
- + {
- + type = ppc_elf_howto_raw[i].type;
- + BFD_ASSERT (type < sizeof (ppc_elf_howto_table) / sizeof (ppc_elf_howto_table[0]));
- + ppc_elf_howto_table[type] = &ppc_elf_howto_raw[i];
- + }
- +}
- +
- +/* This function handles relaxing for the PPC with option --mpc860c0[=<n>].
- +
- + The MPC860, revision C0 or earlier contains a bug in the die.
- + If all of the following conditions are true, the next instruction
- + to be executed *may* be treated as a no-op.
- + 1/ A forward branch is executed.
- + 2/ The branch is predicted as not taken.
- + 3/ The branch is taken.
- + 4/ The branch is located in the last 5 words of a page.
- + (The EOP limit is 5 by default but may be specified as any value from 1-10.)
- +
- + Our software solution is to detect these problematic branches in a
- + linker pass and modify them as follows:
- + 1/ Unconditional branches - Since these are always predicted taken,
- + there is no problem and no action is required.
- + 2/ Conditional backward branches - No problem, no action required.
- + 3/ Conditional forward branches - Ensure that the "inverse prediction
- + bit" is set (ensure it is predicted taken).
- + 4/ Conditional register branches - Ensure that the "y bit" is set
- + (ensure it is predicted taken).
- +*/
- +
- +/* Sort sections by address. */
- +
- +static int
- +ppc_elf_sort_rela (arg1, arg2)
- + const PTR arg1;
- + const PTR arg2;
- +{
- + const Elf_Internal_Rela **rela1 = (const Elf_Internal_Rela**) arg1;
- + const Elf_Internal_Rela **rela2 = (const Elf_Internal_Rela**) arg2;
- +
- + /* Sort by offset. */
- + return ((*rela1)->r_offset - (*rela2)->r_offset);
- +}
- +
- +static boolean
- +ppc_elf_relax_section (abfd, isec, link_info, again)
- + bfd *abfd;
- + asection *isec;
- + struct bfd_link_info *link_info;
- + boolean *again;
- +{
- +#define PAGESIZE 0x1000
- +
- + bfd_byte *contents = NULL;
- + bfd_byte *free_contents = NULL;
- + Elf_Internal_Rela *internal_relocs = NULL;
- + Elf_Internal_Rela *free_relocs = NULL;
- + Elf_Internal_Rela **rela_comb = NULL;
- + int comb_curr, comb_count;
- +
- + /* We never have to do this more than once per input section. */
- + *again = false;
- +
- + /* If needed, initialize this section's cooked size. */
- + if (isec->_cooked_size == 0)
- + isec->_cooked_size = isec->_raw_size;
- +
- + /* We're only interested in text sections which overlap the
- + troublesome area at the end of a page. */
- + if (link_info->mpc860c0 && (isec->flags & SEC_CODE) && isec->_cooked_size)
- + {
- + bfd_vma dot, end_page, end_section;
- + boolean section_modified;
- +
- + /* Get the section contents. */
- + /* Get cached copy if it exists. */
- + if (elf_section_data (isec)->this_hdr.contents != NULL)
- + contents = elf_section_data (isec)->this_hdr.contents;
- + else
- + {
- + /* Go get them off disk. */
- + contents = (bfd_byte *) bfd_malloc (isec->_raw_size);
- + if (contents == NULL)
- + goto error_return;
- + free_contents = contents;
- +
- + if (! bfd_get_section_contents (abfd, isec, contents,
- + (file_ptr) 0, isec->_raw_size))
- + goto error_return;
- + }
- +
- + comb_curr = 0;
- + comb_count = 0;
- + if (isec->reloc_count)
- + {
- + unsigned n;
- + bfd_size_type amt;
- +
- + /* Get a copy of the native relocations. */
- + internal_relocs = _bfd_elf32_link_read_relocs (
- + abfd, isec, (PTR) NULL, (Elf_Internal_Rela *) NULL,
- + link_info->keep_memory);
- + if (internal_relocs == NULL)
- + goto error_return;
- + if (! link_info->keep_memory)
- + free_relocs = internal_relocs;
- +
- + /* Setup a faster access method for the reloc info we need. */
- + amt = isec->reloc_count;
- + amt *= sizeof (Elf_Internal_Rela*);
- + rela_comb = (Elf_Internal_Rela**) bfd_malloc (amt);
- + if (rela_comb == NULL)
- + goto error_return;
- + for (n = 0; n < isec->reloc_count; ++n)
- + {
- + long r_type;
- +
- + r_type = ELF32_R_TYPE (internal_relocs[n].r_info);
- + if (r_type < 0 || r_type >= (int) R_PPC_max)
- + goto error_return;
- +
- + /* Prologue constants are sometimes present in the ".text"
- + sections and they can be identified by their associated relocation.
- + We don't want to process those words and some others which
- + can also be identified by their relocations. However, not all
- + conditional branches will have a relocation so we will
- + only ignore words that 1) have a reloc, and 2) the reloc
- + is not applicable to a conditional branch.
- + The array rela_comb is built here for use in the EOP scan loop. */
- + switch (r_type)
- + {
- + case R_PPC_ADDR14_BRNTAKEN: /* absolute, predicted not taken */
- + case R_PPC_REL14: /* relative cond. br. */
- + case R_PPC_REL14_BRNTAKEN: /* rel. cond. br., predicted not taken */
- + /* We should check the instruction. */
- + break;
- + default:
- + /* The word is not a conditional branch - ignore it. */
- + rela_comb[comb_count++] = &internal_relocs[n];
- + break;
- + }
- + }
- + if (comb_count > 1)
- + qsort (rela_comb, (size_t) comb_count, sizeof (int), ppc_elf_sort_rela);
- + }
- +
- + /* Enumerate each EOP region that overlaps this section. */
- + end_section = isec->vma + isec->_cooked_size;
- + dot = end_page = (isec->vma | (PAGESIZE - 1)) + 1;
- + dot -= link_info->mpc860c0;
- + section_modified = false;
- + if (dot < isec->vma) /* Increment the start position if this section */
- + dot = isec->vma; /* begins in the middle of its first EOP region. */
- + for (;
- + dot < end_section;
- + dot += PAGESIZE, end_page += PAGESIZE)
- + {
- +
- + /* Check each word in this EOP region. */
- + for (; dot < end_page; dot += 4)
- + {
- + bfd_vma isec_offset;
- + unsigned long insn;
- + boolean skip, modified;
- +
- + /* Don't process this word if there is a relocation for it and
- + the relocation indicates the word is not a conditional branch. */
- + skip = false;
- + isec_offset = dot - isec->vma;
- + for (; comb_curr<comb_count; ++comb_curr)
- + {
- + bfd_vma r_offset;
- +
- + r_offset = rela_comb[comb_curr]->r_offset;
- + if (r_offset >= isec_offset)
- + {
- + if (r_offset == isec_offset) skip = true;
- + break;
- + }
- + }
- + if (skip) continue;
- +
- + /* Check the current word for a problematic conditional branch. */
- +#define BO0(insn) ((insn) & 0x02000000)
- +#define BO2(insn) ((insn) & 0x00800000)
- +#define BO4(insn) ((insn) & 0x00200000)
- + insn = (unsigned long) bfd_get_32 (abfd, contents + isec_offset);
- + modified = false;
- + if ((insn & 0xFc000000) == 0x40000000)
- + {
- + /* Instruction is BCx */
- + if ((!BO0(insn) || !BO2(insn)) && !BO4(insn))
- + {
- + bfd_vma target;
- + /* This branch is predicted as "normal".
- + If this is a forward branch, it is problematic. */
- +
- + target = insn & 0x0000Fffc; /*extract*/
- + target = (target ^ 0x8000) - 0x8000; /*sign extend*/
- + if ((insn & 0x00000002) == 0)
- + target += dot; /*convert to abs*/
- + if (target > dot)
- + {
- + insn |= 0x00200000; /* set the prediction bit */
- + modified = true;
- + }
- + }
- + }
- + else if ((insn & 0xFc00Fffe) == 0x4c000420)
- + {
- + /* Instruction is BCCTRx */
- + if ((!BO0(insn) || !BO2(insn)) && !BO4(insn))
- + {
- + /* This branch is predicted as not-taken.
- + If this is a forward branch, it is problematic.
- + Since we can't tell statically if it will branch forward,
- + always set the prediction bit. */
- + insn |= 0x00200000; /* set the prediction bit */
- + modified = true;
- + }
- + }
- + else if ((insn & 0xFc00Fffe) == 0x4c000020)
- + {
- + /* Instruction is BCLRx */
- + if ((!BO0(insn) || !BO2(insn)) && !BO4(insn))
- + {
- + /* This branch is predicted as not-taken.
- + If this is a forward branch, it is problematic.
- + Since we can't tell statically if it will branch forward,
- + always set the prediction bit. */
- + insn |= 0x00200000; /* set the prediction bit */
- + modified = true;
- + }
- + }
- +#undef BO0
- +#undef BO2
- +#undef BO4
- + if (modified)
- + {
- + bfd_put_32 (abfd, (bfd_vma) insn, contents + isec_offset);
- + section_modified = true;
- + }
- + }
- + }
- + if (section_modified)
- + {
- + elf_section_data (isec)->this_hdr.contents = contents;
- + free_contents = NULL;
- + }
- + }
- +
- + if (rela_comb != NULL)
- + {
- + free (rela_comb);
- + rela_comb = NULL;
- + }
- +
- + if (free_relocs != NULL)
- + {
- + free (free_relocs);
- + free_relocs = NULL;
- + }
- +
- + if (free_contents != NULL)
- + {
- + if (! link_info->keep_memory)
- + free (free_contents);
- + else
- + {
- + /* Cache the section contents for elf_link_input_bfd. */
- + elf_section_data (isec)->this_hdr.contents = contents;
- + }
- + free_contents = NULL;
- + }
- +
- + return true;
- +
- +error_return:
- + if (rela_comb != NULL)
- + free (rela_comb);
- + if (free_relocs != NULL)
- + free (free_relocs);
- + if (free_contents != NULL)
- + free (free_contents);
- + return false;
- +}
- +
- +static reloc_howto_type *
- +ppc_elf_reloc_type_lookup (abfd, code)
- + bfd *abfd ATTRIBUTE_UNUSED;
- + bfd_reloc_code_real_type code;
- +{
- + enum elf_ppc_reloc_type ppc_reloc = R_PPC_NONE;
- +
- + if (!ppc_elf_howto_table[R_PPC_ADDR32])
- + /* Initialize howto table if needed. */
- + ppc_elf_howto_init ();
- +
- + switch ((int) code)
- + {
- + default:
- + return (reloc_howto_type *) NULL;
- +
- + case BFD_RELOC_NONE: ppc_reloc = R_PPC_NONE; break;
- + case BFD_RELOC_32: ppc_reloc = R_PPC_ADDR32; break;
- + case BFD_RELOC_PPC_BA26: ppc_reloc = R_PPC_ADDR24; break;
- + case BFD_RELOC_16: ppc_reloc = R_PPC_ADDR16; break;
- + case BFD_RELOC_LO16: ppc_reloc = R_PPC_ADDR16_LO; break;
- + case BFD_RELOC_HI16: ppc_reloc = R_PPC_ADDR16_HI; break;
- + case BFD_RELOC_HI16_S: ppc_reloc = R_PPC_ADDR16_HA; break;
- + case BFD_RELOC_PPC_BA16: ppc_reloc = R_PPC_ADDR14; break;
- + case BFD_RELOC_PPC_BA16_BRTAKEN: ppc_reloc = R_PPC_ADDR14_BRTAKEN; break;
- + case BFD_RELOC_PPC_BA16_BRNTAKEN: ppc_reloc = R_PPC_ADDR14_BRNTAKEN; break;
- + case BFD_RELOC_PPC_B26: ppc_reloc = R_PPC_REL24; break;
- + case BFD_RELOC_PPC_B16: ppc_reloc = R_PPC_REL14; break;
- + case BFD_RELOC_PPC_B16_BRTAKEN: ppc_reloc = R_PPC_REL14_BRTAKEN; break;
- + case BFD_RELOC_PPC_B16_BRNTAKEN: ppc_reloc = R_PPC_REL14_BRNTAKEN; break;
- + case BFD_RELOC_16_GOTOFF: ppc_reloc = R_PPC_GOT16; break;
- + case BFD_RELOC_LO16_GOTOFF: ppc_reloc = R_PPC_GOT16_LO; break;
- + case BFD_RELOC_HI16_GOTOFF: ppc_reloc = R_PPC_GOT16_HI; break;
- + case BFD_RELOC_HI16_S_GOTOFF: ppc_reloc = R_PPC_GOT16_HA; break;
- + case BFD_RELOC_24_PLT_PCREL: ppc_reloc = R_PPC_PLTREL24; break;
- + case BFD_RELOC_PPC_COPY: ppc_reloc = R_PPC_COPY; break;
- + case BFD_RELOC_PPC_GLOB_DAT: ppc_reloc = R_PPC_GLOB_DAT; break;
- + case BFD_RELOC_PPC_LOCAL24PC: ppc_reloc = R_PPC_LOCAL24PC; break;
- + case BFD_RELOC_32_PCREL: ppc_reloc = R_PPC_REL32; break;
- + case BFD_RELOC_32_PLTOFF: ppc_reloc = R_PPC_PLT32; break;
- + case BFD_RELOC_32_PLT_PCREL: ppc_reloc = R_PPC_PLTREL32; break;
- + case BFD_RELOC_LO16_PLTOFF: ppc_reloc = R_PPC_PLT16_LO; break;
- + case BFD_RELOC_HI16_PLTOFF: ppc_reloc = R_PPC_PLT16_HI; break;
- + case BFD_RELOC_HI16_S_PLTOFF: ppc_reloc = R_PPC_PLT16_HA; break;
- + case BFD_RELOC_GPREL16: ppc_reloc = R_PPC_SDAREL16; break;
- + case BFD_RELOC_16_BASEREL: ppc_reloc = R_PPC_SECTOFF; break;
- + case BFD_RELOC_LO16_BASEREL: ppc_reloc = R_PPC_SECTOFF_LO; break;
- + case BFD_RELOC_HI16_BASEREL: ppc_reloc = R_PPC_SECTOFF_HI; break;
- + case BFD_RELOC_HI16_S_BASEREL: ppc_reloc = R_PPC_SECTOFF_HA; break;
- + case BFD_RELOC_CTOR: ppc_reloc = R_PPC_ADDR32; break;
- + case BFD_RELOC_PPC_TOC16: ppc_reloc = R_PPC_TOC16; break;
- + case BFD_RELOC_PPC_EMB_NADDR32: ppc_reloc = R_PPC_EMB_NADDR32; break;
- + case BFD_RELOC_PPC_EMB_NADDR16: ppc_reloc = R_PPC_EMB_NADDR16; break;
- + case BFD_RELOC_PPC_EMB_NADDR16_LO: ppc_reloc = R_PPC_EMB_NADDR16_LO; break;
- + case BFD_RELOC_PPC_EMB_NADDR16_HI: ppc_reloc = R_PPC_EMB_NADDR16_HI; break;
- + case BFD_RELOC_PPC_EMB_NADDR16_HA: ppc_reloc = R_PPC_EMB_NADDR16_HA; break;
- + case BFD_RELOC_PPC_EMB_SDAI16: ppc_reloc = R_PPC_EMB_SDAI16; break;
- + case BFD_RELOC_PPC_EMB_SDA2I16: ppc_reloc = R_PPC_EMB_SDA2I16; break;
- + case BFD_RELOC_PPC_EMB_SDA2REL: ppc_reloc = R_PPC_EMB_SDA2REL; break;
- + case BFD_RELOC_PPC_EMB_SDA21: ppc_reloc = R_PPC_EMB_SDA21; break;
- + case BFD_RELOC_PPC_EMB_MRKREF: ppc_reloc = R_PPC_EMB_MRKREF; break;
- + case BFD_RELOC_PPC_EMB_RELSEC16: ppc_reloc = R_PPC_EMB_RELSEC16; break;
- + case BFD_RELOC_PPC_EMB_RELST_LO: ppc_reloc = R_PPC_EMB_RELST_LO; break;
- + case BFD_RELOC_PPC_EMB_RELST_HI: ppc_reloc = R_PPC_EMB_RELST_HI; break;
- + case BFD_RELOC_PPC_EMB_RELST_HA: ppc_reloc = R_PPC_EMB_RELST_HA; break;
- + case BFD_RELOC_PPC_EMB_BIT_FLD: ppc_reloc = R_PPC_EMB_BIT_FLD; break;
- + case BFD_RELOC_PPC_EMB_RELSDA: ppc_reloc = R_PPC_EMB_RELSDA; break;
- + case BFD_RELOC_VTABLE_INHERIT: ppc_reloc = R_PPC_GNU_VTINHERIT; break;
- + case BFD_RELOC_VTABLE_ENTRY: ppc_reloc = R_PPC_GNU_VTENTRY; break;
- + }
- +
- + return ppc_elf_howto_table[(int) ppc_reloc];
- +};
- +
- +/* Set the howto pointer for a PowerPC ELF reloc. */
- +
- +static void
- +ppc_elf_info_to_howto (abfd, cache_ptr, dst)
- + bfd *abfd ATTRIBUTE_UNUSED;
- + arelent *cache_ptr;
- + Elf32_Internal_Rela *dst;
- +{
- + if (!ppc_elf_howto_table[R_PPC_ADDR32])
- + /* Initialize howto table if needed. */
- + ppc_elf_howto_init ();
- +
- + BFD_ASSERT (ELF32_R_TYPE (dst->r_info) < (unsigned int) R_PPC_max);
- + cache_ptr->howto = ppc_elf_howto_table[ELF32_R_TYPE (dst->r_info)];
- +}
- +
- +/* Handle the R_PPC_ADDR16_HA reloc. */
- +
- +static bfd_reloc_status_type
- +ppc_elf_addr16_ha_reloc (abfd, reloc_entry, symbol, data, input_section,
- + output_bfd, error_message)
- + bfd *abfd ATTRIBUTE_UNUSED;
- + arelent *reloc_entry;
- + asymbol *symbol;
- + PTR data ATTRIBUTE_UNUSED;
- + asection *input_section;
- + bfd *output_bfd;
- + char **error_message ATTRIBUTE_UNUSED;
- +{
- + bfd_vma relocation;
- +
- + if (output_bfd != NULL)
- + {
- + reloc_entry->address += input_section->output_offset;
- + return bfd_reloc_ok;
- + }
- +
- + if (reloc_entry->address > input_section->_cooked_size)
- + return bfd_reloc_outofrange;
- +
- + if (bfd_is_com_section (symbol->section))
- + relocation = 0;
- + else
- + relocation = symbol->value;
- +
- + relocation += symbol->section->output_section->vma;
- + relocation += symbol->section->output_offset;
- + relocation += reloc_entry->addend;
- +
- + reloc_entry->addend += (relocation & 0x8000) << 1;
- +
- + return bfd_reloc_continue;
- +}
- +
- +/* Fix bad default arch selected for a 32 bit input bfd when the
- + default is 64 bit. */
- +
- +static boolean
- +ppc_elf_object_p (abfd)
- + bfd *abfd;
- +{
- + if (abfd->arch_info->the_default && abfd->arch_info->bits_per_word == 64)
- + {
- + Elf_Internal_Ehdr *i_ehdr = elf_elfheader (abfd);
- +
- + if (i_ehdr->e_ident[EI_CLASS] == ELFCLASS32)
- + {
- + /* Relies on arch after 64 bit default being 32 bit default. */
- + abfd->arch_info = abfd->arch_info->next;
- + BFD_ASSERT (abfd->arch_info->bits_per_word == 32);
- + }
- + }
- + return true;
- +}
- +
- +/* Function to set whether a module needs the -mrelocatable bit set. */
- +
- +static boolean
- +ppc_elf_set_private_flags (abfd, flags)
- + bfd *abfd;
- + flagword flags;
- +{
- + BFD_ASSERT (!elf_flags_init (abfd)
- + || elf_elfheader (abfd)->e_flags == flags);
- +
- + elf_elfheader (abfd)->e_flags = flags;
- + elf_flags_init (abfd) = true;
- + return true;
- +}
- +
- +/* Merge backend specific data from an object file to the output
- + object file when linking */
- +static boolean
- +ppc_elf_merge_private_bfd_data (ibfd, obfd)
- + bfd *ibfd;
- + bfd *obfd;
- +{
- + flagword old_flags;
- + flagword new_flags;
- + boolean error;
- +
- + /* Check if we have the same endianess */
- + if (! _bfd_generic_verify_endian_match (ibfd, obfd))
- + return false;
- +
- + if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- + || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- + return true;
- +
- + new_flags = elf_elfheader (ibfd)->e_flags;
- + old_flags = elf_elfheader (obfd)->e_flags;
- + if (!elf_flags_init (obfd)) /* First call, no flags set */
- + {
- + elf_flags_init (obfd) = true;
- + elf_elfheader (obfd)->e_flags = new_flags;
- + }
- +
- + else if (new_flags == old_flags) /* Compatible flags are ok */
- + ;
- +
- + else /* Incompatible flags */
- + {
- + /* Warn about -mrelocatable mismatch. Allow -mrelocatable-lib to be linked
- + with either. */
- + error = false;
- + if ((new_flags & EF_PPC_RELOCATABLE) != 0
- + && (old_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0)
- + {
- + error = true;
- + (*_bfd_error_handler)
- + (_("%s: compiled with -mrelocatable and linked with modules compiled normally"),
- + bfd_archive_filename (ibfd));
- + }
- + else if ((new_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0
- + && (old_flags & EF_PPC_RELOCATABLE) != 0)
- + {
- + error = true;
- + (*_bfd_error_handler)
- + (_("%s: compiled normally and linked with modules compiled with -mrelocatable"),
- + bfd_archive_filename (ibfd));
- + }
- +
- + /* The output is -mrelocatable-lib iff both the input files are. */
- + if (! (new_flags & EF_PPC_RELOCATABLE_LIB))
- + elf_elfheader (obfd)->e_flags &= ~EF_PPC_RELOCATABLE_LIB;
- +
- + /* The output is -mrelocatable iff it can't be -mrelocatable-lib,
- + but each input file is either -mrelocatable or -mrelocatable-lib. */
- + if (! (elf_elfheader (obfd)->e_flags & EF_PPC_RELOCATABLE_LIB)
- + && (new_flags & (EF_PPC_RELOCATABLE_LIB | EF_PPC_RELOCATABLE))
- + && (old_flags & (EF_PPC_RELOCATABLE_LIB | EF_PPC_RELOCATABLE)))
- + elf_elfheader (obfd)->e_flags |= EF_PPC_RELOCATABLE;
- +
- + /* Do not warn about eabi vs. V.4 mismatch, just or in the bit if any module uses it */
- + elf_elfheader (obfd)->e_flags |= (new_flags & EF_PPC_EMB);
- +
- + new_flags &= ~ (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB | EF_PPC_EMB);
- + old_flags &= ~ (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB | EF_PPC_EMB);
- +
- + /* Warn about any other mismatches */
- + if (new_flags != old_flags)
- + {
- + error = true;
- + (*_bfd_error_handler)
- + (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
- + bfd_archive_filename (ibfd), (long) new_flags, (long) old_flags);
- + }
- +
- + if (error)
- + {
- + bfd_set_error (bfd_error_bad_value);
- + return false;
- + }
- + }
- +
- + return true;
- +}
- +
- +/* Handle a PowerPC specific section when reading an object file. This
- + is called when elfcode.h finds a section with an unknown type. */
- +
- +static boolean
- +ppc_elf_section_from_shdr (abfd, hdr, name)
- + bfd *abfd;
- + Elf32_Internal_Shdr *hdr;
- + const char *name;
- +{
- + asection *newsect;
- + flagword flags;
- +
- + if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name))
- + return false;
- +
- + newsect = hdr->bfd_section;
- + flags = bfd_get_section_flags (abfd, newsect);
- + if (hdr->sh_flags & SHF_EXCLUDE)
- + flags |= SEC_EXCLUDE;
- +
- + if (hdr->sh_type == SHT_ORDERED)
- + flags |= SEC_SORT_ENTRIES;
- +
- + bfd_set_section_flags (abfd, newsect, flags);
- + return true;
- +}
- +
- +/* Set up any other section flags and such that may be necessary. */
- +
- +static boolean
- +ppc_elf_fake_sections (abfd, shdr, asect)
- + bfd *abfd ATTRIBUTE_UNUSED;
- + Elf32_Internal_Shdr *shdr;
- + asection *asect;
- +{
- + if ((asect->flags & SEC_EXCLUDE) != 0)
- + shdr->sh_flags |= SHF_EXCLUDE;
- +
- + if ((asect->flags & SEC_SORT_ENTRIES) != 0)
- + shdr->sh_type = SHT_ORDERED;
- +
- + return true;
- +}
- +
- +/* Create a special linker section */
- +static elf_linker_section_t *
- +ppc_elf_create_linker_section (abfd, info, which)
- + bfd *abfd;
- + struct bfd_link_info *info;
- + enum elf_linker_section_enum which;
- +{
- + bfd *dynobj = elf_hash_table (info)->dynobj;
- + elf_linker_section_t *lsect;
- +
- + /* Record the first bfd section that needs the special section */
- + if (!dynobj)
- + dynobj = elf_hash_table (info)->dynobj = abfd;
- +
- + /* If this is the first time, create the section */
- + lsect = elf_linker_section (dynobj, which);
- + if (!lsect)
- + {
- + elf_linker_section_t defaults;
- + static elf_linker_section_t zero_section;
- +
- + defaults = zero_section;
- + defaults.which = which;
- + defaults.hole_written_p = false;
- + defaults.alignment = 2;
- +
- + /* Both of these sections are (technically) created by the user
- + putting data in them, so they shouldn't be marked
- + SEC_LINKER_CREATED.
- +
- + The linker creates them so it has somewhere to attach their
- + respective symbols. In fact, if they were empty it would
- + be OK to leave the symbol set to 0 (or any random number), because
- + the appropriate register should never be used. */
- + defaults.flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
- + | SEC_IN_MEMORY);
- +
- + switch (which)
- + {
- + default:
- + (*_bfd_error_handler) (_("%s: Unknown special linker type %d"),
- + bfd_get_filename (abfd),
- + (int) which);
- +
- + bfd_set_error (bfd_error_bad_value);
- + return (elf_linker_section_t *) 0;
- +
- + case LINKER_SECTION_SDATA: /* .sdata/.sbss section */
- + defaults.name = ".sdata";
- + defaults.rel_name = ".rela.sdata";
- + defaults.bss_name = ".sbss";
- + defaults.sym_name = "_SDA_BASE_";
- + defaults.sym_offset = 32768;
- + break;
- +
- + case LINKER_SECTION_SDATA2: /* .sdata2/.sbss2 section */
- + defaults.name = ".sdata2";
- + defaults.rel_name = ".rela.sdata2";
- + defaults.bss_name = ".sbss2";
- + defaults.sym_name = "_SDA2_BASE_";
- + defaults.sym_offset = 32768;
- + defaults.flags |= SEC_READONLY;
- + break;
- + }
- +
- + lsect = _bfd_elf_create_linker_section (abfd, info, which, &defaults);
- + }
- +
- + return lsect;
- +}
- +
- +/* If we have a non-zero sized .sbss2 or .PPC.EMB.sbss0 sections, we
- + need to bump up the number of section headers. */
- +
- +static int
- +ppc_elf_additional_program_headers (abfd)
- + bfd *abfd;
- +{
- + asection *s;
- + int ret;
- +
- + ret = 0;
- +
- + s = bfd_get_section_by_name (abfd, ".interp");
- + if (s != NULL)
- + ++ret;
- +
- + s = bfd_get_section_by_name (abfd, ".sbss2");
- + if (s != NULL && (s->flags & SEC_LOAD) != 0 && s->_raw_size > 0)
- + ++ret;
- +
- + s = bfd_get_section_by_name (abfd, ".PPC.EMB.sbss0");
- + if (s != NULL && (s->flags & SEC_LOAD) != 0 && s->_raw_size > 0)
- + ++ret;
- +
- + return ret;
- +}
- +
- +/* Modify the segment map if needed. */
- +
- +static boolean
- +ppc_elf_modify_segment_map (abfd)
- + bfd *abfd ATTRIBUTE_UNUSED;
- +{
- + return true;
- +}
- +
- +/* The powerpc .got has a blrl instruction in it. Mark it executable. */
- +
- +static asection *
- +ppc_elf_create_got (abfd, info)
- + bfd *abfd;
- + struct bfd_link_info *info;
- +{
- + register asection *s;
- + flagword flags;
- +
- + if (!_bfd_elf_create_got_section (abfd, info))
- + return NULL;
- +
- + s = bfd_get_section_by_name (abfd, ".got");
- + if (s == NULL)
- + abort ();
- +
- + flags = (SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS | SEC_IN_MEMORY
- + | SEC_LINKER_CREATED);
- + if (!bfd_set_section_flags (abfd, s, flags))
- + return NULL;
- + return s;
- +}
- +
- +/* We have to create .dynsbss and .rela.sbss here so that they get mapped
- + to output sections (just like _bfd_elf_create_dynamic_sections has
- + to create .dynbss and .rela.bss). */
- +
- +static boolean
- +ppc_elf_create_dynamic_sections (abfd, info)
- + bfd *abfd;
- + struct bfd_link_info *info;
- +{
- + register asection *s;
- + flagword flags;
- +
- + if (!ppc_elf_create_got (abfd, info))
- + return false;
- +
- + if (!_bfd_elf_create_dynamic_sections (abfd, info))
- + return false;
- +
- + flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
- + | SEC_LINKER_CREATED);
- +
- + s = bfd_make_section (abfd, ".dynsbss");
- + if (s == NULL
- + || ! bfd_set_section_flags (abfd, s, SEC_ALLOC))
- + return false;
- +
- + if (! info->shared)
- + {
- + s = bfd_make_section (abfd, ".rela.sbss");
- + if (s == NULL
- + || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
- + || ! bfd_set_section_alignment (abfd, s, 2))
- + return false;
- + }
- +
- + s = bfd_get_section_by_name (abfd, ".plt");
- + if (s == NULL)
- + abort ();
- +
- + flags = SEC_ALLOC | SEC_CODE | SEC_IN_MEMORY | SEC_LINKER_CREATED;
- + return bfd_set_section_flags (abfd, s, flags);
- +}
- +
- +/* Adjust a symbol defined by a dynamic object and referenced by a
- + regular object. The current definition is in some section of the
- + dynamic object, but we're not including those sections. We have to
- + change the definition to something the rest of the link can
- + understand. */
- +
- +static boolean
- +ppc_elf_adjust_dynamic_symbol (info, h)
- + struct bfd_link_info *info;
- + struct elf_link_hash_entry *h;
- +{
- + bfd *dynobj = elf_hash_table (info)->dynobj;
- + asection *s;
- + unsigned int power_of_two;
- + bfd_vma plt_offset;
- +
- +#ifdef DEBUG
- + fprintf (stderr, "ppc_elf_adjust_dynamic_symbol called for %s\n", h->root.root.string);
- +#endif
- +
- + /* Make sure we know what is going on here. */
- + BFD_ASSERT (dynobj != NULL
- + && ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT)
- + || h->weakdef != NULL
- + || ((h->elf_link_hash_flags
- + & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- + && (h->elf_link_hash_flags
- + & ELF_LINK_HASH_REF_REGULAR) != 0
- + && (h->elf_link_hash_flags
- + & ELF_LINK_HASH_DEF_REGULAR) == 0)));
- +
- + /* If this is a function, put it in the procedure linkage table. We
- + will fill in the contents of the procedure linkage table later,
- + when we know the address of the .got section. */
- + if (h->type == STT_FUNC
- + || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
- + {
- + if (! elf_hash_table (info)->dynamic_sections_created
- + || SYMBOL_CALLS_LOCAL (info, h)
- + || (info->shared && h->plt.refcount <= 0))
- + {
- + /* A PLT entry is not required/allowed when:
- +
- + 1. We are not using ld.so; because then the PLT entry
- + can't be set up, so we can't use one.
- +
- + 2. We know for certain that a call to this symbol
- + will go to this object.
- +
- + 3. GC has rendered the entry unused.
- + Note, however, that in an executable all references to the
- + symbol go to the PLT, so we can't turn it off in that case.
- + ??? The correct thing to do here is to reference count
- + all uses of the symbol, not just those to the GOT or PLT. */
- + h->plt.offset = (bfd_vma) -1;
- + h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
- + return true;
- + }
- +
- + /* Make sure this symbol is output as a dynamic symbol. */
- + if (h->dynindx == -1)
- + {
- + if (! bfd_elf32_link_record_dynamic_symbol (info, h))
- + return false;
- + }
- + BFD_ASSERT (h->dynindx != -1);
- +
- + s = bfd_get_section_by_name (dynobj, ".plt");
- + BFD_ASSERT (s != NULL);
- +
- + /* If this is the first .plt entry, make room for the special
- + first entry. */
- + if (s->_raw_size == 0)
- + s->_raw_size += PLT_INITIAL_ENTRY_SIZE;
- +
- + /* The PowerPC PLT is actually composed of two parts, the first part
- + is 2 words (for a load and a jump), and then there is a remaining
- + word available at the end. */
- + plt_offset = (PLT_INITIAL_ENTRY_SIZE
- + + (PLT_SLOT_SIZE
- + * ((s->_raw_size - PLT_INITIAL_ENTRY_SIZE)
- + / PLT_ENTRY_SIZE)));
- +
- + /* If this symbol is not defined in a regular file, and we are
- + not generating a shared library, then set the symbol to this
- + location in the .plt. This is required to make function
- + pointers compare as equal between the normal executable and
- + the shared library. */
- + if (! info->shared
- + && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- + {
- + h->root.u.def.section = s;
- + h->root.u.def.value = plt_offset;
- + }
- +
- + h->plt.offset = plt_offset;
- +
- + /* Make room for this entry. After the 8192nd entry, room
- + for two entries is allocated. */
- + if ((s->_raw_size - PLT_INITIAL_ENTRY_SIZE) / PLT_ENTRY_SIZE
- + >= PLT_NUM_SINGLE_ENTRIES)
- + s->_raw_size += 2 * PLT_ENTRY_SIZE;
- + else
- + s->_raw_size += PLT_ENTRY_SIZE;
- +
- + /* We also need to make an entry in the .rela.plt section. */
- + s = bfd_get_section_by_name (dynobj, ".rela.plt");
- + BFD_ASSERT (s != NULL);
- + s->_raw_size += sizeof (Elf32_External_Rela);
- +
- + return true;
- + }
- + else
- + h->plt.offset = (bfd_vma) -1;
- +
- + /* If this is a weak symbol, and there is a real definition, the
- + processor independent code will have arranged for us to see the
- + real definition first, and we can just use the same value. */
- + if (h->weakdef != NULL)
- + {
- + BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined
- + || h->weakdef->root.type == bfd_link_hash_defweak);
- + h->root.u.def.section = h->weakdef->root.u.def.section;
- + h->root.u.def.value = h->weakdef->root.u.def.value;
- + return true;
- + }
- +
- + /* This is a reference to a symbol defined by a dynamic object which
- + is not a function. */
- +
- + /* If we are creating a shared library, we must presume that the
- + only references to the symbol are via the global offset table.
- + For such cases we need not do anything here; the relocations will
- + be handled correctly by relocate_section. */
- + if (info->shared)
- + return true;
- +
- + /* We must allocate the symbol in our .dynbss section, which will
- + become part of the .bss section of the executable. There will be
- + an entry for this symbol in the .dynsym section. The dynamic
- + object will contain position independent code, so all references
- + from the dynamic object to this symbol will go through the global
- + offset table. The dynamic linker will use the .dynsym entry to
- + determine the address it must put in the global offset table, so
- + both the dynamic object and the regular object will refer to the
- + same memory location for the variable.
- +
- + Of course, if the symbol is sufficiently small, we must instead
- + allocate it in .sbss. FIXME: It would be better to do this if and
- + only if there were actually SDAREL relocs for that symbol. */
- +
- + if (h->size <= elf_gp_size (dynobj))
- + s = bfd_get_section_by_name (dynobj, ".dynsbss");
- + else
- + s = bfd_get_section_by_name (dynobj, ".dynbss");
- + BFD_ASSERT (s != NULL);
- +
- + /* We must generate a R_PPC_COPY reloc to tell the dynamic linker to
- + copy the initial value out of the dynamic object and into the
- + runtime process image. We need to remember the offset into the
- + .rela.bss section we are going to use. */
- + if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
- + {
- + asection *srel;
- +
- + if (h->size <= elf_gp_size (dynobj))
- + srel = bfd_get_section_by_name (dynobj, ".rela.sbss");
- + else
- + srel = bfd_get_section_by_name (dynobj, ".rela.bss");
- + BFD_ASSERT (srel != NULL);
- + srel->_raw_size += sizeof (Elf32_External_Rela);
- + h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
- + }
- +
- + /* We need to figure out the alignment required for this symbol. I
- + have no idea how ELF linkers handle this. */
- + power_of_two = bfd_log2 (h->size);
- + if (power_of_two > 4)
- + power_of_two = 4;
- +
- + /* Apply the required alignment. */
- + s->_raw_size = BFD_ALIGN (s->_raw_size,
- + (bfd_size_type) (1 << power_of_two));
- + if (power_of_two > bfd_get_section_alignment (dynobj, s))
- + {
- + if (! bfd_set_section_alignment (dynobj, s, power_of_two))
- + return false;
- + }
- +
- + /* Define the symbol as being at this point in the section. */
- + h->root.u.def.section = s;
- + h->root.u.def.value = s->_raw_size;
- +
- + /* Increment the section size to make room for the symbol. */
- + s->_raw_size += h->size;
- +
- + return true;
- +}
- +
- +/* Set the sizes of the dynamic sections. */
- +
- +static boolean
- +ppc_elf_size_dynamic_sections (output_bfd, info)
- + bfd *output_bfd ATTRIBUTE_UNUSED;
- + struct bfd_link_info *info;
- +{
- + bfd *dynobj;
- + asection *s;
- + boolean plt;
- + boolean relocs;
- +
- +#ifdef DEBUG
- + fprintf (stderr, "ppc_elf_size_dynamic_sections called\n");
- +#endif
- +
- + dynobj = elf_hash_table (info)->dynobj;
- + BFD_ASSERT (dynobj != NULL);
- +
- + if (elf_hash_table (info)->dynamic_sections_created)
- + {
- + /* Set the contents of the .interp section to the interpreter. */
- + if (! info->shared)
- + {
- + s = bfd_get_section_by_name (dynobj, ".interp");
- + BFD_ASSERT (s != NULL);
- + s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
- + s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
- + }
- + }
- + else
- + {
- + /* We may have created entries in the .rela.got, .rela.sdata, and
- + .rela.sdata2 sections. However, if we are not creating the
- + dynamic sections, we will not actually use these entries. Reset
- + the size of .rela.got, et al, which will cause it to get
- + stripped from the output file below. */
- + static char *rela_sections[] = { ".rela.got", ".rela.sdata",
- + ".rela.sdata2", ".rela.sbss",
- + (char *) 0 };
- + char **p;
- +
- + for (p = rela_sections; *p != (char *) 0; p++)
- + {
- + s = bfd_get_section_by_name (dynobj, *p);
- + if (s != NULL)
- + s->_raw_size = 0;
- + }
- + }
- +
- + /* The check_relocs and adjust_dynamic_symbol entry points have
- + determined the sizes of the various dynamic sections. Allocate
- + memory for them. */
- + plt = false;
- + relocs = false;
- + for (s = dynobj->sections; s != NULL; s = s->next)
- + {
- + const char *name;
- + boolean strip;
- +
- + if ((s->flags & SEC_LINKER_CREATED) == 0)
- + continue;
- +
- + /* It's OK to base decisions on the section name, because none
- + of the dynobj section names depend upon the input files. */
- + name = bfd_get_section_name (dynobj, s);
- +
- + strip = false;
- +
- + if (strcmp (name, ".plt") == 0)
- + {
- + if (s->_raw_size == 0)
- + {
- + /* Strip this section if we don't need it; see the
- + comment below. */
- + strip = true;
- + }
- + else
- + {
- + /* Remember whether there is a PLT. */
- + plt = true;
- + }
- + }
- + else if (strncmp (name, ".rela", 5) == 0)
- + {
- + if (s->_raw_size == 0)
- + {
- + /* If we don't need this section, strip it from the
- + output file. This is mostly to handle .rela.bss and
- + .rela.plt. We must create both sections in
- + create_dynamic_sections, because they must be created
- + before the linker maps input sections to output
- + sections. The linker does that before
- + adjust_dynamic_symbol is called, and it is that
- + function which decides whether anything needs to go
- + into these sections. */
- + strip = true;
- + }
- + else
- + {
- + /* Remember whether there are any relocation sections. */
- + relocs = true;
- +
- + /* We use the reloc_count field as a counter if we need
- + to copy relocs into the output file. */
- + s->reloc_count = 0;
- + }
- + }
- + else if (strcmp (name, ".got") != 0
- + && strcmp (name, ".sdata") != 0
- + && strcmp (name, ".sdata2") != 0)
- + {
- + /* It's not one of our sections, so don't allocate space. */
- + continue;
- + }
- +
- + if (strip)
- + {
- + _bfd_strip_section_from_output (info, s);
- + continue;
- + }
- +
- + /* Allocate memory for the section contents. */
- + s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
- + if (s->contents == NULL && s->_raw_size != 0)
- + return false;
- + }
- +
- + if (elf_hash_table (info)->dynamic_sections_created)
- + {
- + /* Add some entries to the .dynamic section. We fill in the
- + values later, in ppc_elf_finish_dynamic_sections, but we
- + must add the entries now so that we get the correct size for
- + the .dynamic section. The DT_DEBUG entry is filled in by the
- + dynamic linker and used by the debugger. */
- +#define add_dynamic_entry(TAG, VAL) \
- + bfd_elf32_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
- +
- + if (!info->shared)
- + {
- + if (!add_dynamic_entry (DT_DEBUG, 0))
- + return false;
- + }
- +
- + if (plt)
- + {
- + if (!add_dynamic_entry (DT_PLTGOT, 0)
- + || !add_dynamic_entry (DT_PLTRELSZ, 0)
- + || !add_dynamic_entry (DT_PLTREL, DT_RELA)
- + || !add_dynamic_entry (DT_JMPREL, 0))
- + return false;
- + }
- +
- + if (relocs)
- + {
- + if (!add_dynamic_entry (DT_RELA, 0)
- + || !add_dynamic_entry (DT_RELASZ, 0)
- + || !add_dynamic_entry (DT_RELAENT, sizeof (Elf32_External_Rela)))
- + return false;
- + }
- +
- + if ((info->flags & DF_TEXTREL) != 0)
- + {
- + if (!add_dynamic_entry (DT_TEXTREL, 0))
- + return false;
- + info->flags |= DF_TEXTREL;
- + }
- + }
- +#undef add_dynamic_entry
- +
- + return true;
- +}
- +
- +/* Look through the relocs for a section during the first phase, and
- + allocate space in the global offset table or procedure linkage
- + table. */
- +
- +static boolean
- +ppc_elf_check_relocs (abfd, info, sec, relocs)
- + bfd *abfd;
- + struct bfd_link_info *info;
- + asection *sec;
- + const Elf_Internal_Rela *relocs;
- +{
- + bfd *dynobj;
- + Elf_Internal_Shdr *symtab_hdr;
- + struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
- + const Elf_Internal_Rela *rel;
- + const Elf_Internal_Rela *rel_end;
- + bfd_signed_vma *local_got_refcounts;
- + elf_linker_section_t *sdata;
- + elf_linker_section_t *sdata2;
- + asection *sreloc;
- + asection *sgot = NULL;
- + asection *srelgot = NULL;
- +
- + if (info->relocateable)
- + return true;
- +
- +#ifdef DEBUG
- + fprintf (stderr, "ppc_elf_check_relocs called for section %s in %s\n",
- + bfd_get_section_name (abfd, sec),
- + bfd_archive_filename (abfd));
- +#endif
- +
- + /* Create the linker generated sections all the time so that the
- + special symbols are created. */
- +
- + if ((sdata = elf_linker_section (abfd, LINKER_SECTION_SDATA)) == NULL)
- + {
- + sdata = ppc_elf_create_linker_section (abfd, info, LINKER_SECTION_SDATA);
- + if (!sdata)
- + return false;
- + }
- +
- + if ((sdata2 = elf_linker_section (abfd, LINKER_SECTION_SDATA2)) == NULL)
- + {
- + sdata2 = ppc_elf_create_linker_section (abfd, info, LINKER_SECTION_SDATA2);
- + if (!sdata2)
- + return false;
- + }
- +
- + dynobj = elf_hash_table (info)->dynobj;
- + symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- + local_got_refcounts = elf_local_got_refcounts (abfd);
- +
- + sym_hashes = elf_sym_hashes (abfd);
- + sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof (Elf32_External_Sym);
- + if (!elf_bad_symtab (abfd))
- + sym_hashes_end -= symtab_hdr->sh_info;
- +
- + sreloc = NULL;
- +
- + rel_end = relocs + sec->reloc_count;
- + for (rel = relocs; rel < rel_end; rel++)
- + {
- + unsigned long r_symndx;
- + struct elf_link_hash_entry *h;
- +
- + r_symndx = ELF32_R_SYM (rel->r_info);
- + if (r_symndx < symtab_hdr->sh_info)
- + h = NULL;
- + else
- + h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- +
- + /* If a relocation refers to _GLOBAL_OFFSET_TABLE_, create the .got.
- + This shows up in particular in an R_PPC_ADDR32 in the eabi
- + startup code. */
- + if (h && strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
- + {
- + if (sgot == NULL)
- + {
- + if (dynobj == NULL)
- + elf_hash_table (info)->dynobj = dynobj = abfd;
- + sgot = ppc_elf_create_got (dynobj, info);
- + if (sgot == NULL)
- + return false;
- + }
- + }
- +
- + switch (ELF32_R_TYPE (rel->r_info))
- + {
- + /* GOT16 relocations */
- + case R_PPC_GOT16:
- + case R_PPC_GOT16_LO:
- + case R_PPC_GOT16_HI:
- + case R_PPC_GOT16_HA:
- + /* This symbol requires a global offset table entry. */
- +
- + if (sgot == NULL)
- + {
- + if (dynobj == NULL)
- + elf_hash_table (info)->dynobj = dynobj = abfd;
- + sgot = ppc_elf_create_got (dynobj, info);
- + if (sgot == NULL)
- + return false;
- + }
- +
- + if (srelgot == NULL
- + && (h != NULL || info->shared))
- + {
- + srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
- + if (srelgot == NULL)
- + {
- + srelgot = bfd_make_section (dynobj, ".rela.got");
- + if (srelgot == NULL
- + || ! bfd_set_section_flags (dynobj, srelgot,
- + (SEC_ALLOC
- + | SEC_LOAD
- + | SEC_HAS_CONTENTS
- + | SEC_IN_MEMORY
- + | SEC_LINKER_CREATED
- + | SEC_READONLY))
- + || ! bfd_set_section_alignment (dynobj, srelgot, 2))
- + return false;
- + }
- + }
- +
- + if (h != NULL)
- + {
- + if (h->got.refcount == 0)
- + {
- + /* Make sure this symbol is output as a dynamic symbol. */
- + if (h->dynindx == -1)
- + if (!bfd_elf32_link_record_dynamic_symbol (info, h))
- + return false;
- +
- + /* Allocate space in the .got. */
- + sgot->_raw_size += 4;
- + /* Allocate relocation space. */
- + srelgot->_raw_size += sizeof (Elf32_External_Rela);
- + }
- + h->got.refcount++;
- + }
- + else
- + {
- + /* This is a global offset table entry for a local symbol. */
- + if (local_got_refcounts == NULL)
- + {
- + bfd_size_type size;
- +
- + size = symtab_hdr->sh_info;
- + size *= sizeof (bfd_signed_vma);
- + local_got_refcounts
- + = (bfd_signed_vma *) bfd_zalloc (abfd, size);
- + if (local_got_refcounts == NULL)
- + return false;
- + elf_local_got_refcounts (abfd) = local_got_refcounts;
- + }
- + if (local_got_refcounts[r_symndx] == 0)
- + {
- + sgot->_raw_size += 4;
- +
- + /* If we are generating a shared object, we need to
- + output a R_PPC_RELATIVE reloc so that the
- + dynamic linker can adjust this GOT entry. */
- + if (info->shared)
- + srelgot->_raw_size += sizeof (Elf32_External_Rela);
- + }
- + local_got_refcounts[r_symndx]++;
- + }
- + break;
- +
- + /* Indirect .sdata relocation */
- + case R_PPC_EMB_SDAI16:
- + if (info->shared)
- + {
- + ((*_bfd_error_handler)
- + (_("%s: relocation %s cannot be used when making a shared object"),
- + bfd_archive_filename (abfd), "R_PPC_EMB_SDAI16"));
- + return false;
- + }
- +
- + if (srelgot == NULL && (h != NULL || info->shared))
- + {
- + srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
- + if (srelgot == NULL)
- + {
- + srelgot = bfd_make_section (dynobj, ".rela.got");
- + if (srelgot == NULL
- + || ! bfd_set_section_flags (dynobj, srelgot,
- + (SEC_ALLOC
- + | SEC_LOAD
- + | SEC_HAS_CONTENTS
- + | SEC_IN_MEMORY
- + | SEC_LINKER_CREATED
- + | SEC_READONLY))
- + || ! bfd_set_section_alignment (dynobj, srelgot, 2))
- + return false;
- + }
- + }
- +
- + if (!bfd_elf32_create_pointer_linker_section (abfd, info, sdata, h, rel))
- + return false;
- +
- + break;
- +
- + /* Indirect .sdata2 relocation */
- + case R_PPC_EMB_SDA2I16:
- + if (info->shared)
- + {
- + ((*_bfd_error_handler)
- + (_("%s: relocation %s cannot be used when making a shared object"),
- + bfd_archive_filename (abfd), "R_PPC_EMB_SDA2I16"));
- + return false;
- + }
- +
- + if (srelgot == NULL && (h != NULL || info->shared))
- + {
- + srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
- + if (srelgot == NULL)
- + {
- + srelgot = bfd_make_section (dynobj, ".rela.got");
- + if (srelgot == NULL
- + || ! bfd_set_section_flags (dynobj, srelgot,
- + (SEC_ALLOC
- + | SEC_LOAD
- + | SEC_HAS_CONTENTS
- + | SEC_IN_MEMORY
- + | SEC_LINKER_CREATED
- + | SEC_READONLY))
- + || ! bfd_set_section_alignment (dynobj, srelgot, 2))
- + return false;
- + }
- + }
- +
- + if (!bfd_elf32_create_pointer_linker_section (abfd, info, sdata2, h, rel))
- + return false;
- +
- + break;
- +
- + case R_PPC_SDAREL16:
- + case R_PPC_EMB_SDA2REL:
- + case R_PPC_EMB_SDA21:
- + if (info->shared)
- + {
- + ((*_bfd_error_handler)
- + (_("%s: relocation %s cannot be used when making a shared object"),
- + bfd_archive_filename (abfd),
- + ppc_elf_howto_table[(int) ELF32_R_TYPE (rel->r_info)]->name));
- + return false;
- + }
- + break;
- +
- + case R_PPC_PLT32:
- + case R_PPC_PLTREL24:
- + case R_PPC_PLT16_LO:
- + case R_PPC_PLT16_HI:
- + case R_PPC_PLT16_HA:
- +#ifdef DEBUG
- + fprintf (stderr, "Reloc requires a PLT entry\n");
- +#endif
- + /* This symbol requires a procedure linkage table entry. We
- + actually build the entry in adjust_dynamic_symbol,
- + because this might be a case of linking PIC code without
- + linking in any dynamic objects, in which case we don't
- + need to generate a procedure linkage table after all. */
- +
- + if (h == NULL)
- + {
- + /* It does not make sense to have a procedure linkage
- + table entry for a local symbol. */
- + bfd_set_error (bfd_error_bad_value);
- + return false;
- + }
- +
- + /* Make sure this symbol is output as a dynamic symbol. */
- + if (h->dynindx == -1)
- + {
- + if (! bfd_elf32_link_record_dynamic_symbol (info, h))
- + return false;
- + }
- + h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
- + h->plt.refcount++;
- + break;
- +
- + /* The following relocations don't need to propagate the
- + relocation if linking a shared object since they are
- + section relative. */
- + case R_PPC_SECTOFF:
- + case R_PPC_SECTOFF_LO:
- + case R_PPC_SECTOFF_HI:
- + case R_PPC_SECTOFF_HA:
- + break;
- +
- + /* This refers only to functions defined in the shared library */
- + case R_PPC_LOCAL24PC:
- + break;
- +
- + /* This relocation describes the C++ object vtable hierarchy.
- + Reconstruct it for later use during GC. */
- + case R_PPC_GNU_VTINHERIT:
- + if (!_bfd_elf32_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
- + return false;
- + break;
- +
- + /* This relocation describes which C++ vtable entries are actually
- + used. Record for later use during GC. */
- + case R_PPC_GNU_VTENTRY:
- + if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_addend))
- + return false;
- + break;
- +
- + /* When creating a shared object, we must copy these
- + relocs into the output file. We create a reloc
- + section in dynobj and make room for the reloc. */
- + case R_PPC_REL24:
- + case R_PPC_REL14:
- + case R_PPC_REL14_BRTAKEN:
- + case R_PPC_REL14_BRNTAKEN:
- + case R_PPC_REL32:
- + if (h == NULL
- + || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0
- + || SYMBOL_REFERENCES_LOCAL (info, h))
- + break;
- + /* fall through */
- +
- + default:
- + if (info->shared)
- + {
- +#ifdef DEBUG
- + fprintf (stderr, "ppc_elf_check_relocs need to create relocation for %s\n",
- + (h && h->root.root.string) ? h->root.root.string : "<unknown>");
- +#endif
- + if (sreloc == NULL)
- + {
- + const char *name;
- +
- + name = (bfd_elf_string_from_elf_section
- + (abfd,
- + elf_elfheader (abfd)->e_shstrndx,
- + elf_section_data (sec)->rel_hdr.sh_name));
- + if (name == NULL)
- + return false;
- +
- + BFD_ASSERT (strncmp (name, ".rela", 5) == 0
- + && strcmp (bfd_get_section_name (abfd, sec),
- + name + 5) == 0);
- +
- + sreloc = bfd_get_section_by_name (dynobj, name);
- + if (sreloc == NULL)
- + {
- + flagword flags;
- +
- + sreloc = bfd_make_section (dynobj, name);
- + flags = (SEC_HAS_CONTENTS | SEC_READONLY
- + | SEC_IN_MEMORY | SEC_LINKER_CREATED);
- + if ((sec->flags & SEC_ALLOC) != 0)
- + flags |= SEC_ALLOC | SEC_LOAD;
- + if (sreloc == NULL
- + || ! bfd_set_section_flags (dynobj, sreloc, flags)
- + || ! bfd_set_section_alignment (dynobj, sreloc, 2))
- + return false;
- + }
- + if (sec->flags & SEC_READONLY)
- + info->flags |= DF_TEXTREL;
- + }
- +
- + sreloc->_raw_size += sizeof (Elf32_External_Rela);
- +
- + /* FIXME: We should here do what the m68k and i386
- + backends do: if the reloc is pc-relative, record it
- + in case it turns out that the reloc is unnecessary
- + because the symbol is forced local by versioning or
- + we are linking with -Bdynamic. Fortunately this
- + case is not frequent. */
- + }
- +
- + break;
- + }
- + }
- +
- + return true;
- +}
- +
- +/* Return the section that should be marked against GC for a given
- + relocation. */
- +
- +static asection *
- +ppc_elf_gc_mark_hook (sec, info, rel, h, sym)
- + asection *sec;
- + struct bfd_link_info *info ATTRIBUTE_UNUSED;
- + Elf_Internal_Rela *rel;
- + struct elf_link_hash_entry *h;
- + Elf_Internal_Sym *sym;
- +{
- + if (h != NULL)
- + {
- + switch (ELF32_R_TYPE (rel->r_info))
- + {
- + case R_PPC_GNU_VTINHERIT:
- + case R_PPC_GNU_VTENTRY:
- + break;
- +
- + default:
- + switch (h->root.type)
- + {
- + case bfd_link_hash_defined:
- + case bfd_link_hash_defweak:
- + return h->root.u.def.section;
- +
- + case bfd_link_hash_common:
- + return h->root.u.c.p->section;
- +
- + default:
- + break;
- + }
- + }
- + }
- + else
- + return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
- +
- + return NULL;
- +}
- +
- +/* Update the got entry reference counts for the section being removed. */
- +
- +static boolean
- +ppc_elf_gc_sweep_hook (abfd, info, sec, relocs)
- + bfd *abfd;
- + struct bfd_link_info *info ATTRIBUTE_UNUSED;
- + asection *sec;
- + const Elf_Internal_Rela *relocs;
- +{
- + Elf_Internal_Shdr *symtab_hdr;
- + struct elf_link_hash_entry **sym_hashes;
- + bfd_signed_vma *local_got_refcounts;
- + const Elf_Internal_Rela *rel, *relend;
- + unsigned long r_symndx;
- + struct elf_link_hash_entry *h;
- +
- + symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- + sym_hashes = elf_sym_hashes (abfd);
- + local_got_refcounts = elf_local_got_refcounts (abfd);
- +
- + relend = relocs + sec->reloc_count;
- + for (rel = relocs; rel < relend; rel++)
- + switch (ELF32_R_TYPE (rel->r_info))
- + {
- + case R_PPC_GOT16:
- + case R_PPC_GOT16_LO:
- + case R_PPC_GOT16_HI:
- + case R_PPC_GOT16_HA:
- + r_symndx = ELF32_R_SYM (rel->r_info);
- + if (r_symndx >= symtab_hdr->sh_info)
- + {
- + h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- + if (h->got.refcount > 0)
- + h->got.refcount--;
- + }
- + else if (local_got_refcounts != NULL)
- + {
- + if (local_got_refcounts[r_symndx] > 0)
- + local_got_refcounts[r_symndx]--;
- + }
- + break;
- +
- + case R_PPC_PLT32:
- + case R_PPC_PLTREL24:
- + case R_PPC_PLT16_LO:
- + case R_PPC_PLT16_HI:
- + case R_PPC_PLT16_HA:
- + r_symndx = ELF32_R_SYM (rel->r_info);
- + if (r_symndx >= symtab_hdr->sh_info)
- + {
- + h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- + if (h->plt.refcount > 0)
- + h->plt.refcount--;
- + }
- + break;
- +
- + default:
- + break;
- + }
- +
- + return true;
- +}
- +
- +/* Hook called by the linker routine which adds symbols from an object
- + file. We use it to put .comm items in .sbss, and not .bss. */
- +
- +static boolean
- +ppc_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
- + bfd *abfd;
- + struct bfd_link_info *info;
- + const Elf_Internal_Sym *sym;
- + const char **namep ATTRIBUTE_UNUSED;
- + flagword *flagsp ATTRIBUTE_UNUSED;
- + asection **secp;
- + bfd_vma *valp;
- +{
- + if (sym->st_shndx == SHN_COMMON
- + && !info->relocateable
- + && sym->st_size <= elf_gp_size (abfd)
- + && info->hash->creator->flavour == bfd_target_elf_flavour)
- + {
- + /* Common symbols less than or equal to -G nn bytes are automatically
- + put into .sdata. */
- + elf_linker_section_t *sdata
- + = ppc_elf_create_linker_section (abfd, info, LINKER_SECTION_SDATA);
- +
- + if (!sdata->bss_section)
- + {
- + bfd_size_type amt;
- +
- + /* We don't go through bfd_make_section, because we don't
- + want to attach this common section to DYNOBJ. The linker
- + will move the symbols to the appropriate output section
- + when it defines common symbols. */
- + amt = sizeof (asection);
- + sdata->bss_section = (asection *) bfd_zalloc (abfd, amt);
- + if (sdata->bss_section == NULL)
- + return false;
- + sdata->bss_section->name = sdata->bss_name;
- + sdata->bss_section->flags = SEC_IS_COMMON;
- + sdata->bss_section->output_section = sdata->bss_section;
- + amt = sizeof (asymbol);
- + sdata->bss_section->symbol = (asymbol *) bfd_zalloc (abfd, amt);
- + amt = sizeof (asymbol *);
- + sdata->bss_section->symbol_ptr_ptr =
- + (asymbol **) bfd_zalloc (abfd, amt);
- + if (sdata->bss_section->symbol == NULL
- + || sdata->bss_section->symbol_ptr_ptr == NULL)
- + return false;
- + sdata->bss_section->symbol->name = sdata->bss_name;
- + sdata->bss_section->symbol->flags = BSF_SECTION_SYM;
- + sdata->bss_section->symbol->section = sdata->bss_section;
- + *sdata->bss_section->symbol_ptr_ptr = sdata->bss_section->symbol;
- + }
- +
- + *secp = sdata->bss_section;
- + *valp = sym->st_size;
- + }
- +
- + return true;
- +}
- +
- +/* Finish up dynamic symbol handling. We set the contents of various
- + dynamic sections here. */
- +
- +static boolean
- +ppc_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
- + bfd *output_bfd;
- + struct bfd_link_info *info;
- + struct elf_link_hash_entry *h;
- + Elf_Internal_Sym *sym;
- +{
- + bfd *dynobj;
- +
- +#ifdef DEBUG
- + fprintf (stderr, "ppc_elf_finish_dynamic_symbol called for %s",
- + h->root.root.string);
- +#endif
- +
- + dynobj = elf_hash_table (info)->dynobj;
- + BFD_ASSERT (dynobj != NULL);
- +
- + if (h->plt.offset != (bfd_vma) -1)
- + {
- + asection *splt;
- + asection *srela;
- + Elf_Internal_Rela rela;
- + bfd_vma reloc_index;
- +
- +#ifdef DEBUG
- + fprintf (stderr, ", plt_offset = %d", h->plt.offset);
- +#endif
- +
- + /* This symbol has an entry in the procedure linkage table. Set
- + it up. */
- +
- + BFD_ASSERT (h->dynindx != -1);
- +
- + splt = bfd_get_section_by_name (dynobj, ".plt");
- + srela = bfd_get_section_by_name (dynobj, ".rela.plt");
- + BFD_ASSERT (splt != NULL && srela != NULL);
- +
- + /* We don't need to fill in the .plt. The ppc dynamic linker
- + will fill it in. */
- +
- + /* Fill in the entry in the .rela.plt section. */
- + rela.r_offset = (splt->output_section->vma
- + + splt->output_offset
- + + h->plt.offset);
- + rela.r_info = ELF32_R_INFO (h->dynindx, R_PPC_JMP_SLOT);
- + rela.r_addend = 0;
- +
- + reloc_index = (h->plt.offset - PLT_INITIAL_ENTRY_SIZE) / PLT_SLOT_SIZE;
- + if (reloc_index > PLT_NUM_SINGLE_ENTRIES)
- + reloc_index -= (reloc_index - PLT_NUM_SINGLE_ENTRIES) / 2;
- + bfd_elf32_swap_reloca_out (output_bfd, &rela,
- + ((Elf32_External_Rela *) srela->contents
- + + reloc_index));
- +
- + if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- + {
- + /* Mark the symbol as undefined, rather than as defined in
- + the .plt section. Leave the value alone. */
- + sym->st_shndx = SHN_UNDEF;
- + /* If the symbol is weak, we do need to clear the value.
- + Otherwise, the PLT entry would provide a definition for
- + the symbol even if the symbol wasn't defined anywhere,
- + and so the symbol would never be NULL. */
- + if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK)
- + == 0)
- + sym->st_value = 0;
- + }
- + }
- +
- + if (h->got.offset != (bfd_vma) -1)
- + {
- + asection *sgot;
- + asection *srela;
- + Elf_Internal_Rela rela;
- +
- + /* This symbol has an entry in the global offset table. Set it
- + up. */
- +
- + sgot = bfd_get_section_by_name (dynobj, ".got");
- + srela = bfd_get_section_by_name (dynobj, ".rela.got");
- + BFD_ASSERT (sgot != NULL && srela != NULL);
- +
- + rela.r_offset = (sgot->output_section->vma
- + + sgot->output_offset
- + + (h->got.offset &~ (bfd_vma) 1));
- +
- + /* If this is a -Bsymbolic link, and the symbol is defined
- + locally, we just want to emit a RELATIVE reloc. The entry in
- + the global offset table will already have been initialized in
- + the relocate_section function. */
- + if (info->shared
- + && SYMBOL_REFERENCES_LOCAL (info, h))
- + {
- + rela.r_info = ELF32_R_INFO (0, R_PPC_RELATIVE);
- + rela.r_addend = (h->root.u.def.value
- + + h->root.u.def.section->output_section->vma
- + + h->root.u.def.section->output_offset);
- + }
- + else
- + {
- + BFD_ASSERT ((h->got.offset & 1) == 0);
- + rela.r_info = ELF32_R_INFO (h->dynindx, R_PPC_GLOB_DAT);
- + rela.r_addend = 0;
- + }
- +
- + bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset);
- + bfd_elf32_swap_reloca_out (output_bfd, &rela,
- + ((Elf32_External_Rela *) srela->contents
- + + srela->reloc_count));
- + ++srela->reloc_count;
- + }
- +
- + if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
- + {
- + asection *s;
- + Elf_Internal_Rela rela;
- +
- + /* This symbols needs a copy reloc. Set it up. */
- +
- +#ifdef DEBUG
- + fprintf (stderr, ", copy");
- +#endif
- +
- + BFD_ASSERT (h->dynindx != -1);
- +
- + if (h->size <= elf_gp_size (dynobj))
- + s = bfd_get_section_by_name (h->root.u.def.section->owner,
- + ".rela.sbss");
- + else
- + s = bfd_get_section_by_name (h->root.u.def.section->owner,
- + ".rela.bss");
- + BFD_ASSERT (s != NULL);
- +
- + rela.r_offset = (h->root.u.def.value
- + + h->root.u.def.section->output_section->vma
- + + h->root.u.def.section->output_offset);
- + rela.r_info = ELF32_R_INFO (h->dynindx, R_PPC_COPY);
- + rela.r_addend = 0;
- + bfd_elf32_swap_reloca_out (output_bfd, &rela,
- + ((Elf32_External_Rela *) s->contents
- + + s->reloc_count));
- + ++s->reloc_count;
- + }
- +
- +#ifdef DEBUG
- + fprintf (stderr, "\n");
- +#endif
- +
- + /* Mark some specially defined symbols as absolute. */
- + if (strcmp (h->root.root.string, "_DYNAMIC") == 0
- + || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0
- + || strcmp (h->root.root.string, "_PROCEDURE_LINKAGE_TABLE_") == 0)
- + sym->st_shndx = SHN_ABS;
- +
- + return true;
- +}
- +
- +/* Finish up the dynamic sections. */
- +
- +static boolean
- +ppc_elf_finish_dynamic_sections (output_bfd, info)
- + bfd *output_bfd;
- + struct bfd_link_info *info;
- +{
- + asection *sdyn;
- + bfd *dynobj = elf_hash_table (info)->dynobj;
- + asection *sgot = bfd_get_section_by_name (dynobj, ".got");
- +
- +#ifdef DEBUG
- + fprintf (stderr, "ppc_elf_finish_dynamic_sections called\n");
- +#endif
- +
- + sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
- +
- + if (elf_hash_table (info)->dynamic_sections_created)
- + {
- + asection *splt;
- + Elf32_External_Dyn *dyncon, *dynconend;
- +
- + splt = bfd_get_section_by_name (dynobj, ".plt");
- + BFD_ASSERT (splt != NULL && sdyn != NULL);
- +
- + dyncon = (Elf32_External_Dyn *) sdyn->contents;
- + dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
- + for (; dyncon < dynconend; dyncon++)
- + {
- + Elf_Internal_Dyn dyn;
- + const char *name;
- + boolean size;
- +
- + bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
- +
- + switch (dyn.d_tag)
- + {
- + case DT_PLTGOT: name = ".plt"; size = false; break;
- + case DT_PLTRELSZ: name = ".rela.plt"; size = true; break;
- + case DT_JMPREL: name = ".rela.plt"; size = false; break;
- + default: name = NULL; size = false; break;
- + }
- +
- + if (name != NULL)
- + {
- + asection *s;
- +
- + s = bfd_get_section_by_name (output_bfd, name);
- + if (s == NULL)
- + dyn.d_un.d_val = 0;
- + else
- + {
- + if (! size)
- + dyn.d_un.d_ptr = s->vma;
- + else
- + {
- + if (s->_cooked_size != 0)
- + dyn.d_un.d_val = s->_cooked_size;
- + else
- + dyn.d_un.d_val = s->_raw_size;
- + }
- + }
- + bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
- + }
- + }
- + }
- +
- + /* Add a blrl instruction at _GLOBAL_OFFSET_TABLE_-4 so that a function can
- + easily find the address of the _GLOBAL_OFFSET_TABLE_. */
- + if (sgot)
- + {
- + unsigned char *contents = sgot->contents;
- + bfd_put_32 (output_bfd, (bfd_vma) 0x4e800021 /* blrl */, contents);
- +
- + if (sdyn == NULL)
- + bfd_put_32 (output_bfd, (bfd_vma) 0, contents+4);
- + else
- + bfd_put_32 (output_bfd,
- + sdyn->output_section->vma + sdyn->output_offset,
- + contents+4);
- +
- + elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4;
- + }
- +
- + return true;
- +}
- +
- +/* The RELOCATE_SECTION function is called by the ELF backend linker
- + to handle the relocations for a section.
- +
- + The relocs are always passed as Rela structures; if the section
- + actually uses Rel structures, the r_addend field will always be
- + zero.
- +
- + This function is responsible for adjust the section contents as
- + necessary, and (if using Rela relocs and generating a
- + relocateable output file) adjusting the reloc addend as
- + necessary.
- +
- + This function does not have to worry about setting the reloc
- + address or the reloc symbol index.
- +
- + LOCAL_SYMS is a pointer to the swapped in local symbols.
- +
- + LOCAL_SECTIONS is an array giving the section in the input file
- + corresponding to the st_shndx field of each local symbol.
- +
- + The global hash table entry for the global symbols can be found
- + via elf_sym_hashes (input_bfd).
- +
- + When generating relocateable output, this function must handle
- + STB_LOCAL/STT_SECTION symbols specially. The output symbol is
- + going to be the section symbol corresponding to the output
- + section, which means that the addend must be adjusted
- + accordingly. */
- +
- +static boolean
- +ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
- + contents, relocs, local_syms, local_sections)
- + bfd *output_bfd;
- + struct bfd_link_info *info;
- + bfd *input_bfd;
- + asection *input_section;
- + bfd_byte *contents;
- + Elf_Internal_Rela *relocs;
- + Elf_Internal_Sym *local_syms;
- + asection **local_sections;
- +{
- + Elf_Internal_Shdr *symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
- + struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
- + bfd *dynobj = elf_hash_table (info)->dynobj;
- + elf_linker_section_t *sdata = (dynobj) ? elf_linker_section (dynobj, LINKER_SECTION_SDATA) : NULL;
- + elf_linker_section_t *sdata2 = (dynobj) ? elf_linker_section (dynobj, LINKER_SECTION_SDATA2) : NULL;
- + Elf_Internal_Rela *rel = relocs;
- + Elf_Internal_Rela *relend = relocs + input_section->reloc_count;
- + asection *sreloc = NULL;
- + asection *splt;
- + asection *sgot;
- + bfd_vma *local_got_offsets;
- + boolean ret = true;
- + long insn;
- +
- +#ifdef DEBUG
- + fprintf (stderr, "ppc_elf_relocate_section called for %s section %s, %ld relocations%s\n",
- + bfd_archive_filename (input_bfd),
- + bfd_section_name(input_bfd, input_section),
- + (long) input_section->reloc_count,
- + (info->relocateable) ? " (relocatable)" : "");
- +#endif
- +
- + if (info->relocateable)
- + return true;
- +
- + if (!ppc_elf_howto_table[R_PPC_ADDR32])
- + /* Initialize howto table if needed. */
- + ppc_elf_howto_init ();
- +
- + local_got_offsets = elf_local_got_offsets (input_bfd);
- +
- + splt = sgot = NULL;
- + if (dynobj != NULL)
- + {
- + splt = bfd_get_section_by_name (dynobj, ".plt");
- + sgot = bfd_get_section_by_name (dynobj, ".got");
- + }
- +
- + for (; rel < relend; rel++)
- + {
- + enum elf_ppc_reloc_type r_type = (enum elf_ppc_reloc_type)ELF32_R_TYPE (rel->r_info);
- + bfd_vma offset = rel->r_offset;
- + bfd_vma addend = rel->r_addend;
- + bfd_reloc_status_type r = bfd_reloc_other;
- + Elf_Internal_Sym *sym = (Elf_Internal_Sym *) 0;
- + asection *sec = (asection *) 0;
- + struct elf_link_hash_entry *h = (struct elf_link_hash_entry *) 0;
- + const char *sym_name = (const char *) 0;
- + reloc_howto_type *howto;
- + unsigned long r_symndx;
- + bfd_vma relocation;
- + int will_become_local;
- +
- + /* Unknown relocation handling */
- + if ((unsigned) r_type >= (unsigned) R_PPC_max
- + || !ppc_elf_howto_table[(int) r_type])
- + {
- + (*_bfd_error_handler) (_("%s: unknown relocation type %d"),
- + bfd_archive_filename (input_bfd),
- + (int) r_type);
- +
- + bfd_set_error (bfd_error_bad_value);
- + ret = false;
- + continue;
- + }
- +
- + howto = ppc_elf_howto_table[(int) r_type];
- + r_symndx = ELF32_R_SYM (rel->r_info);
- +
- + if (r_symndx < symtab_hdr->sh_info)
- + {
- + sym = local_syms + r_symndx;
- + sec = local_sections[r_symndx];
- + sym_name = "<local symbol>";
- +
- + relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
- + addend = rel->r_addend;
- + /* Relocs to local symbols are always resolved. */
- + will_become_local = 1;
- + }
- + else
- + {
- + h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- + while (h->root.type == bfd_link_hash_indirect
- + || h->root.type == bfd_link_hash_warning)
- + h = (struct elf_link_hash_entry *) h->root.u.i.link;
- + sym_name = h->root.root.string;
- +
- + /* Can this relocation be resolved immediately? */
- + will_become_local = SYMBOL_REFERENCES_LOCAL (info, h);
- +
- + if (h->root.type == bfd_link_hash_defined
- + || h->root.type == bfd_link_hash_defweak)
- + {
- + sec = h->root.u.def.section;
- + if (((r_type == R_PPC_PLT32
- + || r_type == R_PPC_PLTREL24)
- + && splt != NULL
- + && h->plt.offset != (bfd_vma) -1)
- + || (r_type == R_PPC_LOCAL24PC
- + && sec->output_section == NULL)
- + || ((r_type == R_PPC_GOT16
- + || r_type == R_PPC_GOT16_LO
- + || r_type == R_PPC_GOT16_HI
- + || r_type == R_PPC_GOT16_HA)
- + && elf_hash_table (info)->dynamic_sections_created
- + && (! info->shared || ! will_become_local))
- + || (info->shared
- + && ! will_become_local
- + && ((input_section->flags & SEC_ALLOC) != 0
- + /* Testing SEC_DEBUGGING here may be wrong.
- + It's here to avoid a crash when
- + generating a shared library with DWARF
- + debugging information. */
- + || ((input_section->flags & SEC_DEBUGGING) != 0
- + && (h->elf_link_hash_flags
- + & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
- + && (r_type == R_PPC_ADDR32
- + || r_type == R_PPC_ADDR24
- + || r_type == R_PPC_ADDR16
- + || r_type == R_PPC_ADDR16_LO
- + || r_type == R_PPC_ADDR16_HI
- + || r_type == R_PPC_ADDR16_HA
- + || r_type == R_PPC_ADDR14
- + || r_type == R_PPC_ADDR14_BRTAKEN
- + || r_type == R_PPC_ADDR14_BRNTAKEN
- + || r_type == R_PPC_COPY
- + || r_type == R_PPC_GLOB_DAT
- + || r_type == R_PPC_JMP_SLOT
- + || r_type == R_PPC_UADDR32
- + || r_type == R_PPC_UADDR16
- + || r_type == R_PPC_SDAREL16
- + || r_type == R_PPC_EMB_NADDR32
- + || r_type == R_PPC_EMB_NADDR16
- + || r_type == R_PPC_EMB_NADDR16_LO
- + || r_type == R_PPC_EMB_NADDR16_HI
- + || r_type == R_PPC_EMB_NADDR16_HA
- + || r_type == R_PPC_EMB_SDAI16
- + || r_type == R_PPC_EMB_SDA2I16
- + || r_type == R_PPC_EMB_SDA2REL
- + || r_type == R_PPC_EMB_SDA21
- + || r_type == R_PPC_EMB_MRKREF
- + || r_type == R_PPC_EMB_BIT_FLD
- + || r_type == R_PPC_EMB_RELSDA
- + || ((r_type == R_PPC_REL24
- + || r_type == R_PPC_REL32
- + || r_type == R_PPC_REL14
- + || r_type == R_PPC_REL14_BRTAKEN
- + || r_type == R_PPC_REL14_BRNTAKEN
- + || r_type == R_PPC_RELATIVE)
- + && strcmp (h->root.root.string,
- + "_GLOBAL_OFFSET_TABLE_") != 0))))
- + {
- + /* In these cases, we don't need the relocation
- + value. We check specially because in some
- + obscure cases sec->output_section will be NULL. */
- + relocation = 0;
- + }
- + else if (sec->output_section == NULL)
- + {
- + (*_bfd_error_handler)
- + (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
- + bfd_archive_filename (input_bfd), h->root.root.string,
- + bfd_get_section_name (input_bfd, input_section));
- + relocation = 0;
- + }
- + else
- + relocation = (h->root.u.def.value
- + + sec->output_section->vma
- + + sec->output_offset);
- + }
- + else if (h->root.type == bfd_link_hash_undefweak)
- + relocation = 0;
- + else if (info->shared
- + && (!info->symbolic || info->allow_shlib_undefined)
- + && !info->no_undefined
- + && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
- + relocation = 0;
- + else
- + {
- + if (! (*info->callbacks->undefined_symbol) (info,
- + h->root.root.string,
- + input_bfd,
- + input_section,
- + rel->r_offset,
- + (!info->shared
- + || info->no_undefined
- + || ELF_ST_VISIBILITY (h->other))))
- + return false;
- + relocation = 0;
- + }
- + }
- +
- + switch ((int) r_type)
- + {
- + default:
- + (*_bfd_error_handler) (_("%s: unknown relocation type %d for symbol %s"),
- + bfd_archive_filename (input_bfd),
- + (int) r_type, sym_name);
- +
- + bfd_set_error (bfd_error_bad_value);
- + ret = false;
- + continue;
- +
- + case (int) R_PPC_NONE:
- + continue;
- +
- + /* Relocations that need no special processing. */
- + case (int) R_PPC_LOCAL24PC:
- + /* It makes no sense to point a local relocation
- + at a symbol not in this object. */
- + if (h != NULL
- + && (h->root.type == bfd_link_hash_defined
- + || h->root.type == bfd_link_hash_defweak)
- + && sec->output_section == NULL)
- + {
- + if (! (*info->callbacks->undefined_symbol) (info,
- + h->root.root.string,
- + input_bfd,
- + input_section,
- + rel->r_offset,
- + true))
- + return false;
- + continue;
- + }
- + break;
- +
- + /* Relocations that may need to be propagated if this is a shared
- + object. */
- + case (int) R_PPC_REL24:
- + case (int) R_PPC_REL32:
- + case (int) R_PPC_REL14:
- + /* If these relocations are not to a named symbol, they can be
- + handled right here, no need to bother the dynamic linker. */
- + if (h == NULL
- + || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0
- + || SYMBOL_REFERENCES_LOCAL (info, h))
- + break;
- + /* fall through */
- +
- + /* Relocations that always need to be propagated if this is a shared
- + object. */
- + case (int) R_PPC_ADDR32:
- + case (int) R_PPC_ADDR24:
- + case (int) R_PPC_ADDR16:
- + case (int) R_PPC_ADDR16_LO:
- + case (int) R_PPC_ADDR16_HI:
- + case (int) R_PPC_ADDR16_HA:
- + case (int) R_PPC_ADDR14:
- + case (int) R_PPC_UADDR32:
- + case (int) R_PPC_UADDR16:
- + if (info->shared && r_symndx != 0)
- + {
- + Elf_Internal_Rela outrel;
- + int skip;
- +
- +#ifdef DEBUG
- + fprintf (stderr, "ppc_elf_relocate_section need to create relocation for %s\n",
- + (h && h->root.root.string) ? h->root.root.string : "<unknown>");
- +#endif
- +
- + /* When generating a shared object, these relocations
- + are copied into the output file to be resolved at run
- + time. */
- +
- + if (sreloc == NULL)
- + {
- + const char *name;
- +
- + name = (bfd_elf_string_from_elf_section
- + (input_bfd,
- + elf_elfheader (input_bfd)->e_shstrndx,
- + elf_section_data (input_section)->rel_hdr.sh_name));
- + if (name == NULL)
- + return false;
- +
- + BFD_ASSERT (strncmp (name, ".rela", 5) == 0
- + && strcmp (bfd_get_section_name (input_bfd,
- + input_section),
- + name + 5) == 0);
- +
- + sreloc = bfd_get_section_by_name (dynobj, name);
- + BFD_ASSERT (sreloc != NULL);
- + }
- +
- + skip = 0;
- +
- + outrel.r_offset =
- + _bfd_elf_section_offset (output_bfd, info, input_section,
- + rel->r_offset);
- + if (outrel.r_offset == (bfd_vma) -1
- + || outrel.r_offset == (bfd_vma) -2)
- + skip = (int) outrel.r_offset;
- + outrel.r_offset += (input_section->output_section->vma
- + + input_section->output_offset);
- +
- + if (skip)
- + memset (&outrel, 0, sizeof outrel);
- + /* h->dynindx may be -1 if this symbol was marked to
- + become local. */
- + else if (! will_become_local)
- + {
- + outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
- + outrel.r_addend = rel->r_addend;
- + }
- + else
- + {
- + if (r_type == R_PPC_ADDR32)
- + {
- + outrel.r_info = ELF32_R_INFO (0, R_PPC_RELATIVE);
- + outrel.r_addend = relocation + rel->r_addend;
- + }
- + else
- + {
- + long indx;
- +
- + if (h == NULL)
- + sec = local_sections[r_symndx];
- + else
- + {
- + BFD_ASSERT (h->root.type == bfd_link_hash_defined
- + || (h->root.type
- + == bfd_link_hash_defweak));
- + sec = h->root.u.def.section;
- + }
- + if (sec != NULL && bfd_is_abs_section (sec))
- + indx = 0;
- + else if (sec == NULL || sec->owner == NULL)
- + {
- + bfd_set_error (bfd_error_bad_value);
- + return false;
- + }
- + else
- + {
- + asection *osec;
- +
- + osec = sec->output_section;
- + indx = elf_section_data (osec)->dynindx;
- + BFD_ASSERT (indx > 0);
- +#ifdef DEBUG
- + if (indx <= 0)
- + {
- + printf ("indx=%d section=%s flags=%08x name=%s\n",
- + indx, osec->name, osec->flags,
- + h->root.root.string);
- + }
- +#endif
- + }
- +
- + outrel.r_info = ELF32_R_INFO (indx, r_type);
- + outrel.r_addend = relocation + rel->r_addend;
- + }
- + }
- +
- + bfd_elf32_swap_reloca_out (output_bfd, &outrel,
- + (((Elf32_External_Rela *)
- + sreloc->contents)
- + + sreloc->reloc_count));
- + ++sreloc->reloc_count;
- +
- + if (skip == -1)
- + continue;
- +
- + /* This reloc will be computed at runtime. We clear the memory
- + so that it contains predictable value. */
- + if (! skip
- + && ((input_section->flags & SEC_ALLOC) != 0
- + || ELF32_R_TYPE (outrel.r_info) != R_PPC_RELATIVE))
- + {
- + relocation = howto->pc_relative ? outrel.r_offset : 0;
- + addend = 0;
- + break;
- + }
- + }
- +
- + /* Arithmetic adjust relocations that aren't going into a
- + shared object. */
- + if (r_type == R_PPC_ADDR16_HA
- + /* It's just possible that this symbol is a weak symbol
- + that's not actually defined anywhere. In that case,
- + 'sec' would be NULL, and we should leave the symbol
- + alone (it will be set to zero elsewhere in the link). */
- + && sec != NULL)
- + {
- + addend += ((relocation + addend) & 0x8000) << 1;
- + }
- + break;
- +
- + /* branch taken prediction relocations */
- + case (int) R_PPC_ADDR14_BRTAKEN:
- + case (int) R_PPC_REL14_BRTAKEN:
- + insn = bfd_get_32 (output_bfd, contents + offset);
- + if ((relocation - offset) & 0x8000)
- + insn &= ~BRANCH_PREDICT_BIT;
- + else
- + insn |= BRANCH_PREDICT_BIT;
- + bfd_put_32 (output_bfd, (bfd_vma) insn, contents + offset);
- + break;
- +
- + /* branch not taken predicition relocations */
- + case (int) R_PPC_ADDR14_BRNTAKEN:
- + case (int) R_PPC_REL14_BRNTAKEN:
- + insn = bfd_get_32 (output_bfd, contents + offset);
- + if ((relocation - offset) & 0x8000)
- + insn |= BRANCH_PREDICT_BIT;
- + else
- + insn &= ~BRANCH_PREDICT_BIT;
- + bfd_put_32 (output_bfd, (bfd_vma) insn, contents + offset);
- + break;
- +
- + /* GOT16 relocations */
- + case (int) R_PPC_GOT16:
- + case (int) R_PPC_GOT16_LO:
- + case (int) R_PPC_GOT16_HI:
- + case (int) R_PPC_GOT16_HA:
- + /* Relocation is to the entry for this symbol in the global
- + offset table. */
- + BFD_ASSERT (sgot != NULL);
- +
- + if (h != NULL)
- + {
- + bfd_vma off;
- +
- + off = h->got.offset;
- + BFD_ASSERT (off != (bfd_vma) -1);
- +
- + if (! elf_hash_table (info)->dynamic_sections_created
- + || (info->shared
- + && SYMBOL_REFERENCES_LOCAL (info, h)))
- + {
- + /* This is actually a static link, or it is a
- + -Bsymbolic link and the symbol is defined
- + locally. We must initialize this entry in the
- + global offset table. Since the offset must
- + always be a multiple of 4, we use the least
- + significant bit to record whether we have
- + initialized it already.
- +
- + When doing a dynamic link, we create a .rela.got
- + relocation entry to initialize the value. This
- + is done in the finish_dynamic_symbol routine. */
- + if ((off & 1) != 0)
- + off &= ~1;
- + else
- + {
- + bfd_put_32 (output_bfd, relocation,
- + sgot->contents + off);
- + h->got.offset |= 1;
- + }
- + }
- +
- + relocation = sgot->output_offset + off - 4;
- + }
- + else
- + {
- + bfd_vma off;
- +
- + BFD_ASSERT (local_got_offsets != NULL
- + && local_got_offsets[r_symndx] != (bfd_vma) -1);
- +
- + off = local_got_offsets[r_symndx];
- +
- + /* The offset must always be a multiple of 4. We use
- + the least significant bit to record whether we have
- + already processed this entry. */
- + if ((off & 1) != 0)
- + off &= ~1;
- + else
- + {
- +
- + if (info->shared)
- + {
- + asection *srelgot;
- + Elf_Internal_Rela outrel;
- +
- + /* We need to generate a R_PPC_RELATIVE reloc
- + for the dynamic linker. */
- + srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
- + BFD_ASSERT (srelgot != NULL);
- +
- + outrel.r_offset = (sgot->output_section->vma
- + + sgot->output_offset
- + + off);
- + outrel.r_info = ELF32_R_INFO (0, R_PPC_RELATIVE);
- + outrel.r_addend = relocation;
- + bfd_elf32_swap_reloca_out (output_bfd, &outrel,
- + (((Elf32_External_Rela *)
- + srelgot->contents)
- + + srelgot->reloc_count));
- + ++srelgot->reloc_count;
- + relocation = 0;
- + }
- +
- + bfd_put_32 (output_bfd, relocation, sgot->contents + off);
- + local_got_offsets[r_symndx] |= 1;
- + }
- +
- + relocation = sgot->output_offset + off - 4;
- + }
- + break;
- +
- + /* Indirect .sdata relocation */
- + case (int) R_PPC_EMB_SDAI16:
- + BFD_ASSERT (sdata != NULL);
- + relocation = bfd_elf32_finish_pointer_linker_section (output_bfd, input_bfd, info,
- + sdata, h, relocation, rel,
- + R_PPC_RELATIVE);
- + break;
- +
- + /* Indirect .sdata2 relocation */
- + case (int) R_PPC_EMB_SDA2I16:
- + BFD_ASSERT (sdata2 != NULL);
- + relocation = bfd_elf32_finish_pointer_linker_section (output_bfd, input_bfd, info,
- + sdata2, h, relocation, rel,
- + R_PPC_RELATIVE);
- + break;
- +
- + /* Handle the TOC16 reloc. We want to use the offset within the .got
- + section, not the actual VMA. This is appropriate when generating
- + an embedded ELF object, for which the .got section acts like the
- + AIX .toc section. */
- + case (int) R_PPC_TOC16: /* phony GOT16 relocations */
- + BFD_ASSERT (sec != (asection *) 0);
- + BFD_ASSERT (bfd_is_und_section (sec)
- + || strcmp (bfd_get_section_name (abfd, sec), ".got") == 0
- + || strcmp (bfd_get_section_name (abfd, sec), ".cgot") == 0)
- +
- + addend -= sec->output_section->vma + sec->output_offset + 0x8000;
- + break;
- +
- + case (int) R_PPC_PLTREL24:
- + /* Relocation is to the entry for this symbol in the
- + procedure linkage table. */
- + BFD_ASSERT (h != NULL);
- +
- + if (h->plt.offset == (bfd_vma) -1
- + || splt == NULL)
- + {
- + /* We didn't make a PLT entry for this symbol. This
- + happens when statically linking PIC code, or when
- + using -Bsymbolic. */
- + break;
- + }
- +
- + relocation = (splt->output_section->vma
- + + splt->output_offset
- + + h->plt.offset);
- + break;
- +
- + /* relocate against _SDA_BASE_ */
- + case (int) R_PPC_SDAREL16:
- + {
- + const char *name;
- +
- + BFD_ASSERT (sec != (asection *) 0);
- + name = bfd_get_section_name (abfd, sec->output_section);
- + if (strcmp (name, ".sdata") != 0
- + && strcmp (name, ".sbss") != 0)
- + {
- + (*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
- + bfd_archive_filename (input_bfd),
- + sym_name,
- + ppc_elf_howto_table[(int) r_type]->name,
- + name);
- + }
- + addend -= (sdata->sym_hash->root.u.def.value
- + + sdata->sym_hash->root.u.def.section->output_section->vma
- + + sdata->sym_hash->root.u.def.section->output_offset);
- + }
- + break;
- +
- + /* relocate against _SDA2_BASE_ */
- + case (int) R_PPC_EMB_SDA2REL:
- + {
- + const char *name;
- +
- + BFD_ASSERT (sec != (asection *) 0);
- + name = bfd_get_section_name (abfd, sec->output_section);
- + if (strcmp (name, ".sdata2") != 0 && strcmp (name, ".sbss2") != 0)
- + {
- + (*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
- + bfd_archive_filename (input_bfd),
- + sym_name,
- + ppc_elf_howto_table[(int) r_type]->name,
- + name);
- +
- + bfd_set_error (bfd_error_bad_value);
- + ret = false;
- + continue;
- + }
- + addend -= (sdata2->sym_hash->root.u.def.value
- + + sdata2->sym_hash->root.u.def.section->output_section->vma
- + + sdata2->sym_hash->root.u.def.section->output_offset);
- + }
- + break;
- +
- + /* relocate against either _SDA_BASE_, _SDA2_BASE_, or 0 */
- + case (int) R_PPC_EMB_SDA21:
- + case (int) R_PPC_EMB_RELSDA:
- + {
- + const char *name;
- + int reg;
- +
- + BFD_ASSERT (sec != (asection *) 0);
- + name = bfd_get_section_name (abfd, sec->output_section);
- + if (strcmp (name, ".sdata") == 0 || strcmp (name, ".sbss") == 0)
- + {
- + reg = 13;
- + addend -= (sdata->sym_hash->root.u.def.value
- + + sdata->sym_hash->root.u.def.section->output_section->vma
- + + sdata->sym_hash->root.u.def.section->output_offset);
- + }
- +
- + else if (strcmp (name, ".sdata2") == 0
- + || strcmp (name, ".sbss2") == 0)
- + {
- + reg = 2;
- + addend -= (sdata2->sym_hash->root.u.def.value
- + + sdata2->sym_hash->root.u.def.section->output_section->vma
- + + sdata2->sym_hash->root.u.def.section->output_offset);
- + }
- +
- + else if (strcmp (name, ".PPC.EMB.sdata0") == 0
- + || strcmp (name, ".PPC.EMB.sbss0") == 0)
- + {
- + reg = 0;
- + }
- +
- + else
- + {
- + (*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
- + bfd_archive_filename (input_bfd),
- + sym_name,
- + ppc_elf_howto_table[(int) r_type]->name,
- + name);
- +
- + bfd_set_error (bfd_error_bad_value);
- + ret = false;
- + continue;
- + }
- +
- + if (r_type == R_PPC_EMB_SDA21)
- + { /* fill in register field */
- + insn = bfd_get_32 (output_bfd, contents + offset);
- + insn = (insn & ~RA_REGISTER_MASK) | (reg << RA_REGISTER_SHIFT);
- + bfd_put_32 (output_bfd, (bfd_vma) insn, contents + offset);
- + }
- + }
- + break;
- +
- + /* Relocate against the beginning of the section */
- + case (int) R_PPC_SECTOFF:
- + case (int) R_PPC_SECTOFF_LO:
- + case (int) R_PPC_SECTOFF_HI:
- + BFD_ASSERT (sec != (asection *) 0);
- + addend -= sec->output_section->vma;
- + break;
- +
- + case (int) R_PPC_SECTOFF_HA:
- + BFD_ASSERT (sec != (asection *) 0);
- + addend -= sec->output_section->vma;
- + addend += ((relocation + addend) & 0x8000) << 1;
- + break;
- +
- + /* Negative relocations */
- + case (int) R_PPC_EMB_NADDR32:
- + case (int) R_PPC_EMB_NADDR16:
- + case (int) R_PPC_EMB_NADDR16_LO:
- + case (int) R_PPC_EMB_NADDR16_HI:
- + addend -= 2 * relocation;
- + break;
- +
- + case (int) R_PPC_EMB_NADDR16_HA:
- + addend -= 2 * relocation;
- + addend += ((relocation + addend) & 0x8000) << 1;
- + break;
- +
- + /* NOP relocation that prevents garbage collecting linkers from omitting a
- + reference. */
- + case (int) R_PPC_EMB_MRKREF:
- + continue;
- +
- + case (int) R_PPC_COPY:
- + case (int) R_PPC_GLOB_DAT:
- + case (int) R_PPC_JMP_SLOT:
- + case (int) R_PPC_RELATIVE:
- + case (int) R_PPC_PLT32:
- + case (int) R_PPC_PLTREL32:
- + case (int) R_PPC_PLT16_LO:
- + case (int) R_PPC_PLT16_HI:
- + case (int) R_PPC_PLT16_HA:
- + case (int) R_PPC_EMB_RELSEC16:
- + case (int) R_PPC_EMB_RELST_LO:
- + case (int) R_PPC_EMB_RELST_HI:
- + case (int) R_PPC_EMB_RELST_HA:
- + case (int) R_PPC_EMB_BIT_FLD:
- + (*_bfd_error_handler) (_("%s: Relocation %s is not yet supported for symbol %s."),
- + bfd_archive_filename (input_bfd),
- + ppc_elf_howto_table[(int) r_type]->name,
- + sym_name);
- +
- + bfd_set_error (bfd_error_invalid_operation);
- + ret = false;
- + continue;
- +
- + case (int) R_PPC_GNU_VTINHERIT:
- + case (int) R_PPC_GNU_VTENTRY:
- + /* These are no-ops in the end. */
- + continue;
- + }
- +
- +#ifdef DEBUG
- + fprintf (stderr, "\ttype = %s (%d), name = %s, symbol index = %ld, offset = %ld, addend = %ld\n",
- + howto->name,
- + (int) r_type,
- + sym_name,
- + r_symndx,
- + (long) offset,
- + (long) addend);
- +#endif
- +
- + r = _bfd_final_link_relocate (howto,
- + input_bfd,
- + input_section,
- + contents,
- + offset,
- + relocation,
- + addend);
- +
- + if (r == bfd_reloc_ok)
- + ;
- + else if (r == bfd_reloc_overflow)
- + {
- + const char *name;
- +
- + if (h != NULL)
- + {
- + if (h->root.type == bfd_link_hash_undefweak
- + && howto->pc_relative)
- + {
- + /* Assume this is a call protected by other code that
- + detect the symbol is undefined. If this is the case,
- + we can safely ignore the overflow. If not, the
- + program is hosed anyway, and a little warning isn't
- + going to help. */
- +
- + continue;
- + }
- +
- + name = h->root.root.string;
- + }
- + else
- + {
- + name = bfd_elf_string_from_elf_section (input_bfd,
- + symtab_hdr->sh_link,
- + sym->st_name);
- + if (name == NULL)
- + continue;
- + if (*name == '\0')
- + name = bfd_section_name (input_bfd, sec);
- + }
- +
- + if (! (*info->callbacks->reloc_overflow) (info,
- + name,
- + howto->name,
- + (bfd_vma) 0,
- + input_bfd,
- + input_section,
- + offset))
- + return false;
- + }
- + else
- + ret = false;
- + }
- +
- +#ifdef DEBUG
- + fprintf (stderr, "\n");
- +#endif
- +
- + return ret;
- +}
- +
- +static enum elf_reloc_type_class
- +ppc_elf_reloc_type_class (rela)
- + const Elf_Internal_Rela *rela;
- +{
- + switch ((int) ELF32_R_TYPE (rela->r_info))
- + {
- + case R_PPC_RELATIVE:
- + return reloc_class_relative;
- + case R_PPC_REL24:
- + case R_PPC_ADDR24:
- + case R_PPC_JMP_SLOT:
- + return reloc_class_plt;
- + case R_PPC_COPY:
- + return reloc_class_copy;
- + default:
- + return reloc_class_normal;
- + }
- +}
- +
- +/* Support for core dump NOTE sections */
- +static boolean
- +ppc_elf_grok_prstatus (abfd, note)
- + bfd *abfd;
- + Elf_Internal_Note *note;
- +{
- + int offset;
- + unsigned int raw_size;
- +
- + switch (note->descsz)
- + {
- + default:
- + return false;
- +
- + case 268: /* Linux/PPC */
- + /* pr_cursig */
- + elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
- +
- + /* pr_pid */
- + elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24);
- +
- + /* pr_reg */
- + offset = 72;
- + raw_size = 192;
- +
- + break;
- + }
- +
- + /* Make a ".reg/999" section. */
- + return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- + raw_size, note->descpos + offset);
- +}
- +
- +static boolean
- +ppc_elf_grok_psinfo (abfd, note)
- + bfd *abfd;
- + Elf_Internal_Note *note;
- +{
- + switch (note->descsz)
- + {
- + default:
- + return false;
- +
- + case 128: /* Linux/PPC elf_prpsinfo */
- + elf_tdata (abfd)->core_program
- + = _bfd_elfcore_strndup (abfd, note->descdata + 32, 16);
- + elf_tdata (abfd)->core_command
- + = _bfd_elfcore_strndup (abfd, note->descdata + 48, 80);
- + }
- +
- + /* Note that for some reason, a spurious space is tacked
- + onto the end of the args in some (at least one anyway)
- + implementations, so strip it off if it exists. */
- +
- + {
- + char *command = elf_tdata (abfd)->core_command;
- + int n = strlen (command);
- +
- + if (0 < n && command[n - 1] == ' ')
- + command[n - 1] = '\0';
- + }
- +
- + return true;
- +}
- +
- +#define TARGET_BIG_SYM bfd_elf32_amiga_vec
- +#define TARGET_BIG_NAME "elf32-amiga"
- +#define ELF_ARCH bfd_arch_powerpc
- +#define ELF_MACHINE_CODE EM_PPC
- +#define ELF_MAXPAGESIZE 0x10000
- +#define elf_info_to_howto ppc_elf_info_to_howto
- +
- +#ifdef EM_CYGNUS_POWERPC
- +#define ELF_MACHINE_ALT1 EM_CYGNUS_POWERPC
- +#endif
- +
- +#ifdef EM_PPC_OLD
- +#define ELF_MACHINE_ALT2 EM_PPC_OLD
- +#endif
- +
- +#define elf_backend_plt_not_loaded 1
- +#define elf_backend_got_symbol_offset 4
- +#define elf_backend_can_gc_sections 1
- +#define elf_backend_can_refcount 1
- +#define elf_backend_got_header_size 12
- +#define elf_backend_plt_header_size PLT_INITIAL_ENTRY_SIZE
- +#define elf_backend_rela_normal 1
- +
- +#define bfd_elf32_bfd_merge_private_bfd_data ppc_elf_merge_private_bfd_data
- +#define bfd_elf32_bfd_relax_section ppc_elf_relax_section
- +#define bfd_elf32_bfd_reloc_type_lookup ppc_elf_reloc_type_lookup
- +#define bfd_elf32_bfd_set_private_flags ppc_elf_set_private_flags
- +#define bfd_elf32_bfd_final_link _bfd_elf32_gc_common_final_link
- +
- +#define elf_backend_object_p ppc_elf_object_p
- +#define elf_backend_gc_mark_hook ppc_elf_gc_mark_hook
- +#define elf_backend_gc_sweep_hook ppc_elf_gc_sweep_hook
- +#define elf_backend_section_from_shdr ppc_elf_section_from_shdr
- +#define elf_backend_relocate_section ppc_elf_relocate_section
- +#define elf_backend_create_dynamic_sections ppc_elf_create_dynamic_sections
- +#define elf_backend_check_relocs ppc_elf_check_relocs
- +#define elf_backend_adjust_dynamic_symbol ppc_elf_adjust_dynamic_symbol
- +#define elf_backend_add_symbol_hook ppc_elf_add_symbol_hook
- +#define elf_backend_size_dynamic_sections ppc_elf_size_dynamic_sections
- +#define elf_backend_finish_dynamic_symbol ppc_elf_finish_dynamic_symbol
- +#define elf_backend_finish_dynamic_sections ppc_elf_finish_dynamic_sections
- +#define elf_backend_fake_sections ppc_elf_fake_sections
- +#define elf_backend_additional_program_headers ppc_elf_additional_program_headers
- +#define elf_backend_modify_segment_map ppc_elf_modify_segment_map
- +#define elf_backend_grok_prstatus ppc_elf_grok_prstatus
- +#define elf_backend_grok_psinfo ppc_elf_grok_psinfo
- +#define elf_backend_reloc_type_class ppc_elf_reloc_type_class
- +
- +#include "elf32-target.h"
- diff -urNEBb binutils-2.14-orig/bfd/elf32-i386-amithlon.c binutils-2.14/bfd/elf32-i386-amithlon.c
- --- binutils-2.14-orig/bfd/elf32-i386-amithlon.c 1970-01-01 01:00:00.000000000 +0100
- +++ binutils-2.14/bfd/elf32-i386-amithlon.c 2003-12-02 14:09:39.000000000 +0100
- @@ -0,0 +1,198 @@
- +/* Intel IA-32 specific support for 32-bit big endian ELF on Amithlon.
- + Copyright 2002 Free Software Foundation, Inc.
- + Written by Martin Blom.
- +
- +This file is part of BFD, the Binary File Descriptor library.
- +
- +This program is free software; you can redistribute it and/or modify
- +it under the terms of the GNU General Public License as published by
- +the Free Software Foundation; either version 2 of the License, or
- +(at your option) any later version.
- +
- +This program is distributed in the hope that it will be useful,
- +but WITHOUT ANY WARRANTY; without even the implied warranty of
- +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +GNU General Public License for more details.
- +
- +You should have received a copy of the GNU General Public License
- +along with this program; if not, write to the Free Software
- +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
- +
- +#define TARGET_LITTLE_SYM bfd_elf32_i386_amithlon_vec
- +#define TARGET_LITTLE_NAME "elf32-i386-amithlon"
- +#define TARGET_BIG_SYM bfd_elf32_i386be_amithlon_vec
- +#define TARGET_BIG_NAME "elf32-i386be-amithlon"
- +#define ELF_ARCH bfd_arch_i386
- +#define ELF_MACHINE_CODE EM_386
- +#define ELF_MAXPAGESIZE 32 //0x1000
- +
- +#include "bfd.h"
- +#include "sysdep.h"
- +#include "elf-bfd.h"
- +
- +/* Forward declarations */
- +extern const bfd_target bfd_elf32_i386_amithlon_vec;
- +extern const bfd_target bfd_elf32_i386be_amithlon_vec;
- +
- +static boolean elf_i386_relocate_section
- + PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- + Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
- +
- +static boolean elf_i386_finish_dynamic_sections
- + PARAMS ((bfd *, struct bfd_link_info *));
- +
- +static boolean elf_i386_finish_dynamic_symbol
- + PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
- + Elf_Internal_Sym *));
- +
- +boolean elf_link_output_relocs
- + PARAMS ((bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *));
- +
- +#define swap_xvec(xvec,c) \
- +do { \
- + xvec->bfd_getx64 = bfd_get ## c ## 64; \
- + xvec->bfd_getx_signed_64 = bfd_get ## c ## _signed_64; \
- + xvec->bfd_putx64 = bfd_put ## c ## 64; \
- + xvec->bfd_getx32 = bfd_get ## c ## 32; \
- + xvec->bfd_getx_signed_32 = bfd_get ## c ## _signed_32; \
- + xvec->bfd_putx32 = bfd_put ## c ## 32; \
- + xvec->bfd_getx16 = bfd_get ## c ## 16; \
- + xvec->bfd_getx_signed_16 = bfd_get ## c ## _signed_16; \
- + xvec->bfd_putx16 = bfd_put ## c ## 16; \
- +} while(0)
- +
- +/* Relocate a big endian i386 ELF section. */
- +
- +static boolean
- +amithlon_relocate_section (output_bfd, info, input_bfd, input_section,
- + contents, relocs, local_syms, local_sections)
- + bfd *output_bfd;
- + struct bfd_link_info *info;
- + bfd *input_bfd;
- + asection *input_section;
- + bfd_byte *contents;
- + Elf_Internal_Rela *relocs;
- + Elf_Internal_Sym *local_syms;
- + asection **local_sections;
- +{
- + boolean switched_input = false;
- + boolean switched_output = false;
- + boolean rc;
- +
- + /* Since code sections are actually little endian, no matter what
- + endian mode we're operating in, this rather dirty hack is used to
- + make sure the correct data access routines are used. */
- +
- + if ((bfd_get_section_flags (input_bfd, input_section) & SEC_CODE))
- + {
- + if (input_bfd->xvec == &bfd_elf32_i386be_amithlon_vec)
- + {
- + switched_input = true;
- +
- + swap_xvec(input_bfd->xvec,l);
- + }
- +
- + if (output_bfd->xvec == &bfd_elf32_i386be_amithlon_vec)
- + {
- + switched_output = true;
- +
- + swap_xvec(output_bfd->xvec,l);
- + }
- + }
- +
- + rc = elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
- + contents, relocs,
- + local_syms, local_sections);
- +
- + if (switched_input)
- + {
- + swap_xvec(input_bfd->xvec,b);
- + }
- +
- + if (switched_output)
- + {
- + swap_xvec(output_bfd->xvec,b);
- + }
- +
- + return rc;
- +}
- +
- +static boolean
- +amithlon_finish_dynamic_sections (output_bfd, info)
- + bfd *output_bfd;
- + struct bfd_link_info *info;
- +{
- + boolean switched_output = false;
- + boolean rc;
- +
- + /* Since code sections are actually little endian, no matter what
- + endian mode we're operating in, this rather dirty hack is used to
- + make sure the correct data access routines are used. */
- +
- + if (output_bfd->xvec == &bfd_elf32_i386be_amithlon_vec)
- + {
- + switched_output = true;
- +
- + swap_xvec(output_bfd->xvec,l);
- + }
- +
- + rc = elf_i386_finish_dynamic_sections (output_bfd, info);
- +
- + if (switched_output)
- + {
- + swap_xvec(output_bfd->xvec,b);
- + }
- +
- + return rc;
- +}
- +
- +static boolean
- +amithlon_finish_dynamic_symbol (output_bfd, info, h, sym)
- + bfd *output_bfd;
- + struct bfd_link_info *info;
- + struct elf_link_hash_entry *h;
- + Elf_Internal_Sym *sym;
- +{
- + boolean switched_output = false;
- + boolean rc;
- +
- + /* Since code sections are actually little endian, no matter what
- + endian mode we're operating in, this rather dirty hack is used to
- + make sure the correct data access routines are used. */
- +
- + if (output_bfd->xvec == &bfd_elf32_i386be_amithlon_vec)
- + {
- + switched_output = true;
- +
- + swap_xvec(output_bfd->xvec,l);
- + }
- +
- + rc = elf_i386_finish_dynamic_symbol (output_bfd, info, h, sym);
- +
- + if (switched_output)
- + {
- + swap_xvec(output_bfd->xvec,b);
- + }
- +
- + return rc;
- +}
- +
- +static bfd_size_type
- +amithlon_additional_program_headers (abfd)
- + bfd *abfd;
- +{
- +// printf("big: %x little: %x\n",
- +// &bfd_elf32_i386be_amithlon_vec,
- +// &bfd_elf32_i386_amithlon_vec);
- + // headers, text, rodata, data+bss
- + return -2+4;
- +}
- +
- +#define elf_backend_relocate_section amithlon_relocate_section
- +#define elf_backend_finish_dynamic_sections amithlon_finish_dynamic_sections
- +#define elf_backend_finish_dynamic_symbol amithlon_finish_dynamic_symbol
- +#define elf_backend_additional_program_headers amithlon_additional_program_headers
- +
- +#define ELF32_I386_RELOCATABLE_EXECUTABLES 1
- +
- +#include "elf32-i386.c"
- diff -urNEBb binutils-2.14-orig/bfd/elf32-i386.c binutils-2.14/bfd/elf32-i386.c
- --- binutils-2.14-orig/bfd/elf32-i386.c 2003-05-02 18:06:14.000000000 +0200
- +++ binutils-2.14/bfd/elf32-i386.c 2003-12-02 14:09:39.000000000 +0100
- @@ -24,6 +24,10 @@
- #include "libbfd.h"
- #include "elf-bfd.h"
-
- +#ifndef ELF32_I386_RELOCATABLE_EXECUTABLES
- +#define ELF32_I386_RELOCATABLE_EXECUTABLES 0
- +#endif
- +
- static reloc_howto_type *elf_i386_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
- static void elf_i386_info_to_howto_rel
- @@ -1105,7 +1109,7 @@
- may need to keep relocations for symbols satisfied by a
- dynamic library if we manage to avoid copy relocs for the
- symbol. */
- - if ((info->shared
- + if (((ELF32_I386_RELOCATABLE_EXECUTABLES || info->shared)
- && (sec->flags & SEC_ALLOC) != 0
- && (r_type != R_386_PC32
- || (h != NULL
- @@ -1673,7 +1677,7 @@
- space for pc-relative relocs that have become local due to symbol
- visibility changes. */
-
- - if (info->shared)
- + if (ELF32_I386_RELOCATABLE_EXECUTABLES || info->shared)
- {
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
- && ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0
- @@ -2421,7 +2425,7 @@
- || (input_section->flags & SEC_ALLOC) == 0)
- break;
-
- - if ((info->shared
- + if (((ELF32_I386_RELOCATABLE_EXECUTABLES || info->shared)
- && (r_type != R_386_PC32
- || (h != NULL
- && h->dynindx != -1
- @@ -2466,6 +2470,7 @@
- memset (&outrel, 0, sizeof outrel);
- else if (h != NULL
- && h->dynindx != -1
- + && !(ELF32_I386_RELOCATABLE_EXECUTABLES && !info->shared)
- && (r_type == R_386_PC32
- || !info->shared
- || !info->symbolic
- @@ -3384,14 +3389,20 @@
- #define elf_backend_copy_indirect_symbol elf_i386_copy_indirect_symbol
- #define elf_backend_create_dynamic_sections elf_i386_create_dynamic_sections
- #define elf_backend_fake_sections elf_i386_fake_sections
- +#ifndef elf_backend_finish_dynamic_sections
- #define elf_backend_finish_dynamic_sections elf_i386_finish_dynamic_sections
- +#endif
- +#ifndef elf_backend_finish_dynamic_symbol
- #define elf_backend_finish_dynamic_symbol elf_i386_finish_dynamic_symbol
- +#endif
- #define elf_backend_gc_mark_hook elf_i386_gc_mark_hook
- #define elf_backend_gc_sweep_hook elf_i386_gc_sweep_hook
- #define elf_backend_grok_prstatus elf_i386_grok_prstatus
- #define elf_backend_grok_psinfo elf_i386_grok_psinfo
- #define elf_backend_reloc_type_class elf_i386_reloc_type_class
- +#ifndef elf_backend_relocate_section
- #define elf_backend_relocate_section elf_i386_relocate_section
- +#endif
- #define elf_backend_size_dynamic_sections elf_i386_size_dynamic_sections
-
- #include "elf32-target.h"
- diff -urNEBb binutils-2.14-orig/bfd/elf32-morphos.c binutils-2.14/bfd/elf32-morphos.c
- --- binutils-2.14-orig/bfd/elf32-morphos.c 1970-01-01 01:00:00.000000000 +0100
- +++ binutils-2.14/bfd/elf32-morphos.c 2003-12-02 14:09:39.000000000 +0100
- @@ -0,0 +1,7137 @@
- +/* PowerPC-specific support for 32-bit ELF
- + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
- + Free Software Foundation, Inc.
- + Written by Ian Lance Taylor, Cygnus Support.
- +
- +This file is part of BFD, the Binary File Descriptor library.
- +
- +This program is free software; you can redistribute it and/or modify
- +it under the terms of the GNU General Public License as published by
- +the Free Software Foundation; either version 2 of the License, or
- +(at your option) any later version.
- +
- +This program is distributed in the hope that it will be useful,
- +but WITHOUT ANY WARRANTY; without even the implied warranty of
- +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +GNU General Public License for more details.
- +
- +You should have received a copy of the GNU General Public License
- +along with this program; if not, write to the Free Software
- +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
- +
- +/* This file is based on a preliminary PowerPC ELF ABI. The
- + information may not match the final PowerPC ELF ABI. It includes
- + suggestions from the in-progress Embedded PowerPC ABI, and that
- + information may also not match. */
- +
- +#define ARCH_SIZE 32
- +
- +#include "bfd.h"
- +#include "sysdep.h"
- +#include "bfdlink.h"
- +#include "genlink.h"
- +#include "libbfd.h"
- +#include "elf-bfd.h"
- +#include "elf/ppc.h"
- +
- +#define USE_RELA /* we want RELA relocations, not REL */
- +
- +/* Renaming structures, typedefs, macros and functions to be size-specific. */
- +#define Elf_External_Ehdr NAME(Elf,External_Ehdr)
- +#define Elf_External_Sym NAME(Elf,External_Sym)
- +#define Elf_External_Shdr NAME(Elf,External_Shdr)
- +#define Elf_External_Phdr NAME(Elf,External_Phdr)
- +#define Elf_External_Rel NAME(Elf,External_Rel)
- +#define Elf_External_Rela NAME(Elf,External_Rela)
- +#define Elf_External_Dyn NAME(Elf,External_Dyn)
- +
- +#define elf_core_file_failing_command NAME(bfd_elf,core_file_failing_command)
- +#define elf_core_file_failing_signal NAME(bfd_elf,core_file_failing_signal)
- +#define elf_core_file_matches_executable_p \
- + NAME(bfd_elf,core_file_matches_executable_p)
- +#define elf_object_p NAME(bfd_elf,object_p)
- +#define elf_core_file_p NAME(bfd_elf,core_file_p)
- +#define elf_get_symtab_upper_bound NAME(bfd_elf,get_symtab_upper_bound)
- +#define elf_get_dynamic_symtab_upper_bound \
- + NAME(bfd_elf,get_dynamic_symtab_upper_bound)
- +#define elf_swap_reloc_in NAME(bfd_elf,swap_reloc_in)
- +#define elf_swap_reloca_in NAME(bfd_elf,swap_reloca_in)
- +#define elf_swap_reloc_out NAME(bfd_elf,swap_reloc_out)
- +#define elf_swap_reloca_out NAME(bfd_elf,swap_reloca_out)
- +#define elf_swap_symbol_in NAME(bfd_elf,swap_symbol_in)
- +#define elf_swap_symbol_out NAME(bfd_elf,swap_symbol_out)
- +#define elf_swap_phdr_in NAME(bfd_elf,swap_phdr_in)
- +#define elf_swap_phdr_out NAME(bfd_elf,swap_phdr_out)
- +#define elf_swap_dyn_in NAME(bfd_elf,swap_dyn_in)
- +#define elf_swap_dyn_out NAME(bfd_elf,swap_dyn_out)
- +#define elf_get_reloc_upper_bound NAME(bfd_elf,get_reloc_upper_bound)
- +#define elf_canonicalize_reloc NAME(bfd_elf,canonicalize_reloc)
- +#define elf_slurp_symbol_table NAME(bfd_elf,slurp_symbol_table)
- +#define elf_get_symtab NAME(bfd_elf,get_symtab)
- +#define elf_canonicalize_dynamic_symtab \
- + NAME(bfd_elf,canonicalize_dynamic_symtab)
- +#define elf_make_empty_symbol NAME(bfd_elf,make_empty_symbol)
- +#define elf_get_symbol_info NAME(bfd_elf,get_symbol_info)
- +#define elf_get_lineno NAME(bfd_elf,get_lineno)
- +#define elf_set_arch_mach NAME(bfd_elf,set_arch_mach)
- +#define elf_find_nearest_line NAME(bfd_elf,find_nearest_line)
- +#define elf_sizeof_headers NAME(bfd_elf,sizeof_headers)
- +#define elf_set_section_contents NAME(bfd_elf,set_section_contents)
- +#define elf_no_info_to_howto NAME(bfd_elf,no_info_to_howto)
- +#define elf_no_info_to_howto_rel NAME(bfd_elf,no_info_to_howto_rel)
- +#define elf_find_section NAME(bfd_elf,find_section)
- +#define elf_bfd_link_add_symbols NAME(bfd_elf,bfd_link_add_symbols)
- +#define elf_add_dynamic_entry NAME(bfd_elf,add_dynamic_entry)
- +#define elf_write_shdrs_and_ehdr NAME(bfd_elf,write_shdrs_and_ehdr)
- +#define elf_write_out_phdrs NAME(bfd_elf,write_out_phdrs)
- +#define elf_write_relocs NAME(bfd_elf,write_relocs)
- +#define elf_slurp_reloc_table NAME(bfd_elf,slurp_reloc_table)
- +#define elf_link_create_dynamic_sections \
- + NAME(bfd_elf,link_create_dynamic_sections)
- +#define elf_bfd_discard_info NAME(bfd_elf,discard_info)
- +#define elf_reloc_symbol_deleted_p NAME(_bfd_elf,reloc_symbol_deleted_p)
- +#define elf_link_record_dynamic_symbol _bfd_elf_link_record_dynamic_symbol
- +#define elf_bfd_final_link NAME(bfd_elf,bfd_final_link)
- +#define elf_create_pointer_linker_section NAME(bfd_elf,create_pointer_linker_section)
- +#define elf_finish_pointer_linker_section NAME(bfd_elf,finish_pointer_linker_section)
- +#define elf_gc_sections NAME(_bfd_elf,gc_sections)
- +#define elf_gc_common_finalize_got_offsets \
- + NAME(_bfd_elf,gc_common_finalize_got_offsets)
- +#define elf_gc_common_final_link NAME(_bfd_elf,gc_common_final_link)
- +#define elf_gc_record_vtinherit NAME(_bfd_elf,gc_record_vtinherit)
- +#define elf_gc_record_vtentry NAME(_bfd_elf,gc_record_vtentry)
- +#define elf_link_record_local_dynamic_symbol \
- + NAME(_bfd_elf,link_record_local_dynamic_symbol)
- +
- +#define ELF_R_INFO(X,Y) ELF32_R_INFO(X,Y)
- +#define ELF_R_SYM(X) ELF32_R_SYM(X)
- +#define ELF_R_TYPE(X) ELF32_R_TYPE(X)
- +#define ELFCLASS ELFCLASS32
- +#define FILE_ALIGN 4
- +#define LOG_FILE_ALIGN 2
- +
- +#define H_PUT_WORD H_PUT_32
- +#define H_PUT_SIGNED_WORD H_PUT_S32
- +#define H_GET_WORD H_GET_32
- +#define H_GET_SIGNED_WORD H_GET_S32
- +
- +#define elf_stringtab_init _bfd_elf_stringtab_init
- +
- +#define section_from_elf_index bfd_section_from_elf_index
- +
- +static int ddr_count;
- +static unsigned *ddr_ptr;
- +
- +static reloc_howto_type *ppc_elf_reloc_type_lookup
- + PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
- +static void ppc_elf_info_to_howto
- + PARAMS ((bfd *abfd, arelent *cache_ptr, Elf32_Internal_Rela *dst));
- +static void ppc_elf_howto_init PARAMS ((void));
- +static int ppc_elf_sort_rela PARAMS ((const PTR, const PTR));
- +static boolean ppc_elf_relax_section
- + PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *));
- +static bfd_reloc_status_type ppc_elf_addr16_ha_reloc
- + PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
- +static boolean ppc_elf_object_p PARAMS ((bfd *));
- +static boolean ppc_elf_set_private_flags PARAMS ((bfd *, flagword));
- +static boolean ppc_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *));
- +
- +static int ppc_elf_additional_program_headers PARAMS ((bfd *));
- +static boolean ppc_elf_modify_segment_map PARAMS ((bfd *));
- +
- +static asection *ppc_elf_create_got
- + PARAMS ((bfd *, struct bfd_link_info *));
- +static boolean ppc_elf_create_dynamic_sections
- + PARAMS ((bfd *, struct bfd_link_info *));
- +
- +static boolean ppc_elf_section_from_shdr PARAMS ((bfd *,
- + Elf32_Internal_Shdr *,
- + const char *));
- +static boolean ppc_elf_fake_sections
- + PARAMS ((bfd *, Elf32_Internal_Shdr *, asection *));
- +
- +static elf_linker_section_t *ppc_elf_create_linker_section
- + PARAMS ((bfd *abfd,
- + struct bfd_link_info *info,
- + enum elf_linker_section_enum));
- +
- +static boolean ppc_elf_check_relocs PARAMS ((bfd *,
- + struct bfd_link_info *,
- + asection *,
- + const Elf_Internal_Rela *));
- +
- +static asection * ppc_elf_gc_mark_hook PARAMS ((asection *sec,
- + struct bfd_link_info *info,
- + Elf_Internal_Rela *rel,
- + struct elf_link_hash_entry *h,
- + Elf_Internal_Sym *sym));
- +
- +static boolean ppc_elf_gc_sweep_hook PARAMS ((bfd *abfd,
- + struct bfd_link_info *info,
- + asection *sec,
- + const Elf_Internal_Rela *relocs));
- +
- +static boolean ppc_elf_adjust_dynamic_symbol PARAMS ((struct bfd_link_info *,
- + struct elf_link_hash_entry *));
- +
- +static boolean ppc_elf_size_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *));
- +
- +static boolean ppc_elf_relocate_section PARAMS ((bfd *,
- + struct bfd_link_info *info,
- + bfd *,
- + asection *,
- + bfd_byte *,
- + Elf_Internal_Rela *relocs,
- + Elf_Internal_Sym *local_syms,
- + asection **));
- +
- +static boolean ppc_elf_add_symbol_hook PARAMS ((bfd *,
- + struct bfd_link_info *,
- + const Elf_Internal_Sym *,
- + const char **,
- + flagword *,
- + asection **,
- + bfd_vma *));
- +
- +static boolean ppc_elf_finish_dynamic_symbol PARAMS ((bfd *,
- + struct bfd_link_info *,
- + struct elf_link_hash_entry *,
- + Elf_Internal_Sym *));
- +
- +static boolean ppc_elf_finish_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *));
- +static enum elf_reloc_type_class ppc_elf_reloc_type_class
- + PARAMS ((const Elf_Internal_Rela *));
- +static boolean ppc_elf_grok_prstatus
- + PARAMS ((bfd *abfd, Elf_Internal_Note *note));
- +static boolean ppc_elf_grok_psinfo
- + PARAMS ((bfd *abfd, Elf_Internal_Note *note));
- +
- +#define BRANCH_PREDICT_BIT 0x200000 /* branch prediction bit for branch taken relocs */
- +#define RA_REGISTER_MASK 0x001f0000 /* mask to set RA in memory instructions */
- +#define RA_REGISTER_SHIFT 16 /* value to shift register by to insert RA */
- +
- +/* The name of the dynamic interpreter. This is put in the .interp
- + section. */
- +
- +#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
- +
- +/* The size in bytes of an entry in the procedure linkage table. */
- +#define PLT_ENTRY_SIZE 12
- +/* The initial size of the plt reserved for the dynamic linker. */
- +#define PLT_INITIAL_ENTRY_SIZE 72
- +/* The size of the gap between entries in the PLT. */
- +#define PLT_SLOT_SIZE 8
- +/* The number of single-slot PLT entries (the rest use two slots). */
- +#define PLT_NUM_SINGLE_ENTRIES 8192
- +
- +/* Will references to this symbol always reference the symbol
- + in this object? */
- +#define SYMBOL_REFERENCES_LOCAL(INFO, H) \
- + ((! INFO->shared \
- + || INFO->symbolic \
- + || H->dynindx == -1 \
- + || ELF_ST_VISIBILITY (H->other) == STV_INTERNAL \
- + || ELF_ST_VISIBILITY (H->other) == STV_HIDDEN) \
- + && (H->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
- +
- +/* Will _calls_ to this symbol always call the version in this object? */
- +#define SYMBOL_CALLS_LOCAL(INFO, H) \
- + ((! INFO->shared \
- + || INFO->symbolic \
- + || H->dynindx == -1 \
- + || ELF_ST_VISIBILITY (H->other) != STV_DEFAULT) \
- + && (H->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
- +
- +static reloc_howto_type *ppc_elf_howto_table[(int) R_PPC_max];
- +
- +static reloc_howto_type ppc_elf_howto_raw[] = {
- + /* This reloc does nothing. */
- + HOWTO (R_PPC_NONE, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_NONE", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* A standard 32 bit relocation. */
- + HOWTO (R_PPC_ADDR32, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_ADDR32", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffffffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* An absolute 26 bit branch; the lower two bits must be zero.
- + FIXME: we don't check that, we just clear them. */
- + HOWTO (R_PPC_ADDR24, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 26, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_ADDR24", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0x3fffffc, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* A standard 16 bit relocation. */
- + HOWTO (R_PPC_ADDR16, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_ADDR16", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* A 16 bit relocation without overflow. */
- + HOWTO (R_PPC_ADDR16_LO, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont,/* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_ADDR16_LO", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* The high order 16 bits of an address. */
- + HOWTO (R_PPC_ADDR16_HI, /* type */
- + 16, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_ADDR16_HI", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* The high order 16 bits of an address, plus 1 if the contents of
- + the low 16 bits, treated as a signed number, is negative. */
- + HOWTO (R_PPC_ADDR16_HA, /* type */
- + 16, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont, /* complain_on_overflow */
- + ppc_elf_addr16_ha_reloc, /* special_function */
- + "R_PPC_ADDR16_HA", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* An absolute 16 bit branch; the lower two bits must be zero.
- + FIXME: we don't check that, we just clear them. */
- + HOWTO (R_PPC_ADDR14, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_ADDR14", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xfffc, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* An absolute 16 bit branch, for which bit 10 should be set to
- + indicate that the branch is expected to be taken. The lower two
- + bits must be zero. */
- + HOWTO (R_PPC_ADDR14_BRTAKEN, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_ADDR14_BRTAKEN",/* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xfffc, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* An absolute 16 bit branch, for which bit 10 should be set to
- + indicate that the branch is not expected to be taken. The lower
- + two bits must be zero. */
- + HOWTO (R_PPC_ADDR14_BRNTAKEN, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_ADDR14_BRNTAKEN",/* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xfffc, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* A relative 26 bit branch; the lower two bits must be zero. */
- + HOWTO (R_PPC_REL24, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 26, /* bitsize */
- + true, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_REL24", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0x3fffffc, /* dst_mask */
- + true), /* pcrel_offset */
- +
- + /* A relative 16 bit branch; the lower two bits must be zero. */
- + HOWTO (R_PPC_REL14, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + true, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_REL14", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xfffc, /* dst_mask */
- + true), /* pcrel_offset */
- +
- + /* A relative 16 bit branch. Bit 10 should be set to indicate that
- + the branch is expected to be taken. The lower two bits must be
- + zero. */
- + HOWTO (R_PPC_REL14_BRTAKEN, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + true, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_REL14_BRTAKEN", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xfffc, /* dst_mask */
- + true), /* pcrel_offset */
- +
- + /* A relative 16 bit branch. Bit 10 should be set to indicate that
- + the branch is not expected to be taken. The lower two bits must
- + be zero. */
- + HOWTO (R_PPC_REL14_BRNTAKEN, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + true, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_REL14_BRNTAKEN",/* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xfffc, /* dst_mask */
- + true), /* pcrel_offset */
- +
- + /* Like R_PPC_ADDR16, but referring to the GOT table entry for the
- + symbol. */
- + HOWTO (R_PPC_GOT16, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_GOT16", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Like R_PPC_ADDR16_LO, but referring to the GOT table entry for
- + the symbol. */
- + HOWTO (R_PPC_GOT16_LO, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_GOT16_LO", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Like R_PPC_ADDR16_HI, but referring to the GOT table entry for
- + the symbol. */
- + HOWTO (R_PPC_GOT16_HI, /* type */
- + 16, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_GOT16_HI", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Like R_PPC_ADDR16_HA, but referring to the GOT table entry for
- + the symbol. */
- + HOWTO (R_PPC_GOT16_HA, /* type */
- + 16, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + ppc_elf_addr16_ha_reloc, /* special_function */
- + "R_PPC_GOT16_HA", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Like R_PPC_REL24, but referring to the procedure linkage table
- + entry for the symbol. */
- + HOWTO (R_PPC_PLTREL24, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 26, /* bitsize */
- + true, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_PLTREL24", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0x3fffffc, /* dst_mask */
- + true), /* pcrel_offset */
- +
- + /* This is used only by the dynamic linker. The symbol should exist
- + both in the object being run and in some shared library. The
- + dynamic linker copies the data addressed by the symbol from the
- + shared library into the object, because the object being
- + run has to have the data at some particular address. */
- + HOWTO (R_PPC_COPY, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_COPY", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Like R_PPC_ADDR32, but used when setting global offset table
- + entries. */
- + HOWTO (R_PPC_GLOB_DAT, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_GLOB_DAT", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffffffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Marks a procedure linkage table entry for a symbol. */
- + HOWTO (R_PPC_JMP_SLOT, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_JMP_SLOT", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Used only by the dynamic linker. When the object is run, this
- + longword is set to the load address of the object, plus the
- + addend. */
- + HOWTO (R_PPC_RELATIVE, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_RELATIVE", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffffffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Like R_PPC_REL24, but uses the value of the symbol within the
- + object rather than the final value. Normally used for
- + _GLOBAL_OFFSET_TABLE_. */
- + HOWTO (R_PPC_LOCAL24PC, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 26, /* bitsize */
- + true, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_LOCAL24PC", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0x3fffffc, /* dst_mask */
- + true), /* pcrel_offset */
- +
- + /* Like R_PPC_ADDR32, but may be unaligned. */
- + HOWTO (R_PPC_UADDR32, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_UADDR32", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffffffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Like R_PPC_ADDR16, but may be unaligned. */
- + HOWTO (R_PPC_UADDR16, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_UADDR16", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* 32-bit PC relative */
- + HOWTO (R_PPC_REL32, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + true, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_REL32", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffffffff, /* dst_mask */
- + true), /* pcrel_offset */
- +
- + /* 32-bit relocation to the symbol's procedure linkage table.
- + FIXME: not supported. */
- + HOWTO (R_PPC_PLT32, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_PLT32", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* 32-bit PC relative relocation to the symbol's procedure linkage table.
- + FIXME: not supported. */
- + HOWTO (R_PPC_PLTREL32, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + true, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_PLTREL32", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0, /* dst_mask */
- + true), /* pcrel_offset */
- +
- + /* Like R_PPC_ADDR16_LO, but referring to the PLT table entry for
- + the symbol. */
- + HOWTO (R_PPC_PLT16_LO, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_PLT16_LO", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Like R_PPC_ADDR16_HI, but referring to the PLT table entry for
- + the symbol. */
- + HOWTO (R_PPC_PLT16_HI, /* type */
- + 16, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_PLT16_HI", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Like R_PPC_ADDR16_HA, but referring to the PLT table entry for
- + the symbol. */
- + HOWTO (R_PPC_PLT16_HA, /* type */
- + 16, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + ppc_elf_addr16_ha_reloc, /* special_function */
- + "R_PPC_PLT16_HA", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* A sign-extended 16 bit value relative to _SDA_BASE_, for use with
- + small data items. */
- + HOWTO (R_PPC_SDAREL16, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_SDAREL16", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* 16-bit section relative relocation. */
- + HOWTO (R_PPC_SECTOFF, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_SECTOFF", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* 16-bit lower half section relative relocation. */
- + HOWTO (R_PPC_SECTOFF_LO, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_SECTOFF_LO", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* 16-bit upper half section relative relocation. */
- + HOWTO (R_PPC_SECTOFF_HI, /* type */
- + 16, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_SECTOFF_HI", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* 16-bit upper half adjusted section relative relocation. */
- + HOWTO (R_PPC_SECTOFF_HA, /* type */
- + 16, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + ppc_elf_addr16_ha_reloc, /* special_function */
- + "R_PPC_SECTOFF_HA", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* The remaining relocs are from the Embedded ELF ABI, and are not
- + in the SVR4 ELF ABI. */
- +
- + /* 32 bit value resulting from the addend minus the symbol */
- + HOWTO (R_PPC_EMB_NADDR32, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_EMB_NADDR32", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffffffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* 16 bit value resulting from the addend minus the symbol */
- + HOWTO (R_PPC_EMB_NADDR16, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_EMB_NADDR16", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* 16 bit value resulting from the addend minus the symbol */
- + HOWTO (R_PPC_EMB_NADDR16_LO, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont,/* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_EMB_ADDR16_LO", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* The high order 16 bits of the addend minus the symbol */
- + HOWTO (R_PPC_EMB_NADDR16_HI, /* type */
- + 16, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_EMB_NADDR16_HI", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* The high order 16 bits of the result of the addend minus the address,
- + plus 1 if the contents of the low 16 bits, treated as a signed number,
- + is negative. */
- + HOWTO (R_PPC_EMB_NADDR16_HA, /* type */
- + 16, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont, /* complain_on_overflow */
- + ppc_elf_addr16_ha_reloc, /* special_function */
- + "R_PPC_EMB_NADDR16_HA", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* 16 bit value resulting from allocating a 4 byte word to hold an
- + address in the .sdata section, and returning the offset from
- + _SDA_BASE_ for that relocation */
- + HOWTO (R_PPC_EMB_SDAI16, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_EMB_SDAI16", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* 16 bit value resulting from allocating a 4 byte word to hold an
- + address in the .sdata2 section, and returning the offset from
- + _SDA2_BASE_ for that relocation */
- + HOWTO (R_PPC_EMB_SDA2I16, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_EMB_SDA2I16", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* A sign-extended 16 bit value relative to _SDA2_BASE_, for use with
- + small data items. */
- + HOWTO (R_PPC_EMB_SDA2REL, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_EMB_SDA2REL", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Relocate against either _SDA_BASE_ or _SDA2_BASE_, filling in the 16 bit
- + signed offset from the appropriate base, and filling in the register
- + field with the appropriate register (0, 2, or 13). */
- + HOWTO (R_PPC_EMB_SDA21, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_EMB_SDA21", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Relocation not handled: R_PPC_EMB_MRKREF */
- + /* Relocation not handled: R_PPC_EMB_RELSEC16 */
- + /* Relocation not handled: R_PPC_EMB_RELST_LO */
- + /* Relocation not handled: R_PPC_EMB_RELST_HI */
- + /* Relocation not handled: R_PPC_EMB_RELST_HA */
- + /* Relocation not handled: R_PPC_EMB_BIT_FLD */
- +
- + /* PC relative relocation against either _SDA_BASE_ or _SDA2_BASE_, filling
- + in the 16 bit signed offset from the appropriate base, and filling in the
- + register field with the appropriate register (0, 2, or 13). */
- + HOWTO (R_PPC_EMB_RELSDA, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + true, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_EMB_RELSDA", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* GNU extension to record C++ vtable hierarchy */
- + HOWTO (R_PPC_GNU_VTINHERIT, /* type */
- + 0, /* rightshift */
- + 0, /* size (0 = byte, 1 = short, 2 = long) */
- + 0, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont, /* complain_on_overflow */
- + NULL, /* special_function */
- + "R_PPC_GNU_VTINHERIT", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* GNU extension to record C++ vtable member usage */
- + HOWTO (R_PPC_GNU_VTENTRY, /* type */
- + 0, /* rightshift */
- + 0, /* size (0 = byte, 1 = short, 2 = long) */
- + 0, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont, /* complain_on_overflow */
- + NULL, /* special_function */
- + "R_PPC_GNU_VTENTRY", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Phony reloc to handle AIX style TOC entries */
- + HOWTO (R_PPC_TOC16, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_signed, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_TOC16", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* 32-bit relocation relative to _SDA_BASE_ */
- + HOWTO (R_PPC_MORPHOS_DREL, /* type */
- + 0, /* rightshift */
- + 2, /* size (0 = byte, 1 = short, 2 = long) */
- + 32, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_bitfield, /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_MORPHOS_DREL", /* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Lower 16 bits of a relocation relative to _SDA_BASE */
- + HOWTO (R_PPC_MORPHOS_DREL_LO, /* type */
- + 0, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont,/* complain_on_overflow */
- + /*complain_overflow_bitfield,*/ /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_MORPHOS_DREL_LO",/* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Upper 16 bits of a relocation relative to _SDA_BASE */
- + HOWTO (R_PPC_MORPHOS_DREL_HI, /* type */
- + 16, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont,/* complain_on_overflow */
- + /*complain_overflow_bitfield,*/ /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_MORPHOS_DREL_HI",/* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +
- + /* Upper 16 bits of a relocation relative to _SDA_BASE */
- + HOWTO (R_PPC_MORPHOS_DREL_HA, /* type */
- + 16, /* rightshift */
- + 1, /* size (0 = byte, 1 = short, 2 = long) */
- + 16, /* bitsize */
- + false, /* pc_relative */
- + 0, /* bitpos */
- + complain_overflow_dont,/* complain_on_overflow */
- + /*complain_overflow_bitfield,*/ /* complain_on_overflow */
- + bfd_elf_generic_reloc, /* special_function */
- + "R_PPC_MORPHOS_DREL_HA",/* name */
- + false, /* partial_inplace */
- + 0, /* src_mask */
- + 0xffff, /* dst_mask */
- + false), /* pcrel_offset */
- +};
- +
- +/* Initialize the ppc_elf_howto_table, so that linear accesses can be done. */
- +
- +static void
- +ppc_elf_howto_init ()
- +{
- + unsigned int i, type;
- +
- + for (i = 0; i < sizeof (ppc_elf_howto_raw) / sizeof (ppc_elf_howto_raw[0]); i++)
- + {
- + type = ppc_elf_howto_raw[i].type;
- + BFD_ASSERT (type < sizeof (ppc_elf_howto_table) / sizeof (ppc_elf_howto_table[0]));
- + ppc_elf_howto_table[type] = &ppc_elf_howto_raw[i];
- + }
- +}
- +
- +/* This function handles relaxing for the PPC with option --mpc860c0[=<n>].
- +
- + The MPC860, revision C0 or earlier contains a bug in the die.
- + If all of the following conditions are true, the next instruction
- + to be executed *may* be treated as a no-op.
- + 1/ A forward branch is executed.
- + 2/ The branch is predicted as not taken.
- + 3/ The branch is taken.
- + 4/ The branch is located in the last 5 words of a page.
- + (The EOP limit is 5 by default but may be specified as any value from 1-10.)
- +
- + Our software solution is to detect these problematic branches in a
- + linker pass and modify them as follows:
- + 1/ Unconditional branches - Since these are always predicted taken,
- + there is no problem and no action is required.
- + 2/ Conditional backward branches - No problem, no action required.
- + 3/ Conditional forward branches - Ensure that the "inverse prediction
- + bit" is set (ensure it is predicted taken).
- + 4/ Conditional register branches - Ensure that the "y bit" is set
- + (ensure it is predicted taken).
- +*/
- +
- +/* Sort sections by address. */
- +
- +static int
- +ppc_elf_sort_rela (arg1, arg2)
- + const PTR arg1;
- + const PTR arg2;
- +{
- + const Elf_Internal_Rela **rela1 = (const Elf_Internal_Rela**) arg1;
- + const Elf_Internal_Rela **rela2 = (const Elf_Internal_Rela**) arg2;
- +
- + /* Sort by offset. */
- + return ((*rela1)->r_offset - (*rela2)->r_offset);
- +}
- +
- +static boolean
- +ppc_elf_relax_section (abfd, isec, link_info, again)
- + bfd *abfd;
- + asection *isec;
- + struct bfd_link_info *link_info;
- + boolean *again;
- +{
- +#define PAGESIZE 0x1000
- +
- + bfd_byte *contents = NULL;
- + bfd_byte *free_contents = NULL;
- + Elf_Internal_Rela *internal_relocs = NULL;
- + Elf_Internal_Rela *free_relocs = NULL;
- + Elf_Internal_Rela **rela_comb = NULL;
- + int comb_curr, comb_count;
- +
- + /* We never have to do this more than once per input section. */
- + *again = false;
- +
- + /* If needed, initialize this section's cooked size. */
- + if (isec->_cooked_size == 0)
- + isec->_cooked_size = isec->_raw_size;
- +
- + /* We're only interested in text sections which overlap the
- + troublesome area at the end of a page. */
- + if (link_info->mpc860c0 && (isec->flags & SEC_CODE) && isec->_cooked_size)
- + {
- + bfd_vma dot, end_page, end_section;
- + boolean section_modified;
- +
- + /* Get the section contents. */
- + /* Get cached copy if it exists. */
- + if (elf_section_data (isec)->this_hdr.contents != NULL)
- + contents = elf_section_data (isec)->this_hdr.contents;
- + else
- + {
- + /* Go get them off disk. */
- + contents = (bfd_byte *) bfd_malloc (isec->_raw_size);
- + if (contents == NULL)
- + goto error_return;
- + free_contents = contents;
- +
- + if (! bfd_get_section_contents (abfd, isec, contents,
- + (file_ptr) 0, isec->_raw_size))
- + goto error_return;
- + }
- +
- + comb_curr = 0;
- + comb_count = 0;
- + if (isec->reloc_count)
- + {
- + unsigned n;
- + bfd_size_type amt;
- +
- + /* Get a copy of the native relocations. */
- + internal_relocs = _bfd_elf32_link_read_relocs (
- + abfd, isec, (PTR) NULL, (Elf_Internal_Rela *) NULL,
- + link_info->keep_memory);
- + if (internal_relocs == NULL)
- + goto error_return;
- + if (! link_info->keep_memory)
- + free_relocs = internal_relocs;
- +
- + /* Setup a faster access method for the reloc info we need. */
- + amt = isec->reloc_count;
- + amt *= sizeof (Elf_Internal_Rela*);
- + rela_comb = (Elf_Internal_Rela**) bfd_malloc (amt);
- + if (rela_comb == NULL)
- + goto error_return;
- + for (n = 0; n < isec->reloc_count; ++n)
- + {
- + long r_type;
- +
- + r_type = ELF32_R_TYPE (internal_relocs[n].r_info);
- + if (r_type < 0 || r_type >= (int) R_PPC_max)
- + goto error_return;
- +
- + /* Prologue constants are sometimes present in the ".text"
- + sections and they can be identified by their associated relocation.
- + We don't want to process those words and some others which
- + can also be identified by their relocations. However, not all
- + conditional branches will have a relocation so we will
- + only ignore words that 1) have a reloc, and 2) the reloc
- + is not applicable to a conditional branch.
- + The array rela_comb is built here for use in the EOP scan loop. */
- + switch (r_type)
- + {
- + case R_PPC_ADDR14_BRNTAKEN: /* absolute, predicted not taken */
- + case R_PPC_REL14: /* relative cond. br. */
- + case R_PPC_REL14_BRNTAKEN: /* rel. cond. br., predicted not taken */
- + /* We should check the instruction. */
- + break;
- + default:
- + /* The word is not a conditional branch - ignore it. */
- + rela_comb[comb_count++] = &internal_relocs[n];
- + break;
- + }
- + }
- + if (comb_count > 1)
- + qsort (rela_comb, (size_t) comb_count, sizeof (int), ppc_elf_sort_rela);
- + }
- +
- + /* Enumerate each EOP region that overlaps this section. */
- + end_section = isec->vma + isec->_cooked_size;
- + dot = end_page = (isec->vma | (PAGESIZE - 1)) + 1;
- + dot -= link_info->mpc860c0;
- + section_modified = false;
- + if (dot < isec->vma) /* Increment the start position if this section */
- + dot = isec->vma; /* begins in the middle of its first EOP region. */
- + for (;
- + dot < end_section;
- + dot += PAGESIZE, end_page += PAGESIZE)
- + {
- +
- + /* Check each word in this EOP region. */
- + for (; dot < end_page; dot += 4)
- + {
- + bfd_vma isec_offset;
- + unsigned long insn;
- + boolean skip, modified;
- +
- + /* Don't process this word if there is a relocation for it and
- + the relocation indicates the word is not a conditional branch. */
- + skip = false;
- + isec_offset = dot - isec->vma;
- + for (; comb_curr<comb_count; ++comb_curr)
- + {
- + bfd_vma r_offset;
- +
- + r_offset = rela_comb[comb_curr]->r_offset;
- + if (r_offset >= isec_offset)
- + {
- + if (r_offset == isec_offset) skip = true;
- + break;
- + }
- + }
- + if (skip) continue;
- +
- + /* Check the current word for a problematic conditional branch. */
- +#define BO0(insn) ((insn) & 0x02000000)
- +#define BO2(insn) ((insn) & 0x00800000)
- +#define BO4(insn) ((insn) & 0x00200000)
- + insn = (unsigned long) bfd_get_32 (abfd, contents + isec_offset);
- + modified = false;
- + if ((insn & 0xFc000000) == 0x40000000)
- + {
- + /* Instruction is BCx */
- + if ((!BO0(insn) || !BO2(insn)) && !BO4(insn))
- + {
- + bfd_vma target;
- + /* This branch is predicted as "normal".
- + If this is a forward branch, it is problematic. */
- +
- + target = insn & 0x0000Fffc; /*extract*/
- + target = (target ^ 0x8000) - 0x8000; /*sign extend*/
- + if ((insn & 0x00000002) == 0)
- + target += dot; /*convert to abs*/
- + if (target > dot)
- + {
- + insn |= 0x00200000; /* set the prediction bit */
- + modified = true;
- + }
- + }
- + }
- + else if ((insn & 0xFc00Fffe) == 0x4c000420)
- + {
- + /* Instruction is BCCTRx */
- + if ((!BO0(insn) || !BO2(insn)) && !BO4(insn))
- + {
- + /* This branch is predicted as not-taken.
- + If this is a forward branch, it is problematic.
- + Since we can't tell statically if it will branch forward,
- + always set the prediction bit. */
- + insn |= 0x00200000; /* set the prediction bit */
- + modified = true;
- + }
- + }
- + else if ((insn & 0xFc00Fffe) == 0x4c000020)
- + {
- + /* Instruction is BCLRx */
- + if ((!BO0(insn) || !BO2(insn)) && !BO4(insn))
- + {
- + /* This branch is predicted as not-taken.
- + If this is a forward branch, it is problematic.
- + Since we can't tell statically if it will branch forward,
- + always set the prediction bit. */
- + insn |= 0x00200000; /* set the prediction bit */
- + modified = true;
- + }
- + }
- +#undef BO0
- +#undef BO2
- +#undef BO4
- + if (modified)
- + {
- + bfd_put_32 (abfd, (bfd_vma) insn, contents + isec_offset);
- + section_modified = true;
- + }
- + }
- + }
- + if (section_modified)
- + {
- + elf_section_data (isec)->this_hdr.contents = contents;
- + free_contents = NULL;
- + }
- + }
- +
- + if (rela_comb != NULL)
- + {
- + free (rela_comb);
- + rela_comb = NULL;
- + }
- +
- + if (free_relocs != NULL)
- + {
- + free (free_relocs);
- + free_relocs = NULL;
- + }
- +
- + if (free_contents != NULL)
- + {
- + if (! link_info->keep_memory)
- + free (free_contents);
- + else
- + {
- + /* Cache the section contents for elf_link_input_bfd. */
- + elf_section_data (isec)->this_hdr.contents = contents;
- + }
- + free_contents = NULL;
- + }
- +
- + return true;
- +
- +error_return:
- + if (rela_comb != NULL)
- + free (rela_comb);
- + if (free_relocs != NULL)
- + free (free_relocs);
- + if (free_contents != NULL)
- + free (free_contents);
- + return false;
- +}
- +
- +static reloc_howto_type *
- +ppc_elf_reloc_type_lookup (abfd, code)
- + bfd *abfd ATTRIBUTE_UNUSED;
- + bfd_reloc_code_real_type code;
- +{
- + enum elf_ppc_reloc_type ppc_reloc = R_PPC_NONE;
- +
- + if (!ppc_elf_howto_table[R_PPC_ADDR32])
- + /* Initialize howto table if needed. */
- + ppc_elf_howto_init ();
- +
- + switch ((int) code)
- + {
- + default:
- + return (reloc_howto_type *) NULL;
- +
- + case BFD_RELOC_NONE: ppc_reloc = R_PPC_NONE; break;
- + case BFD_RELOC_32: ppc_reloc = R_PPC_ADDR32; break;
- + case BFD_RELOC_PPC_BA26: ppc_reloc = R_PPC_ADDR24; break;
- + case BFD_RELOC_16: ppc_reloc = R_PPC_ADDR16; break;
- + case BFD_RELOC_LO16: ppc_reloc = R_PPC_ADDR16_LO; break;
- + case BFD_RELOC_HI16: ppc_reloc = R_PPC_ADDR16_HI; break;
- + case BFD_RELOC_HI16_S: ppc_reloc = R_PPC_ADDR16_HA; break;
- + case BFD_RELOC_PPC_BA16: ppc_reloc = R_PPC_ADDR14; break;
- + case BFD_RELOC_PPC_BA16_BRTAKEN: ppc_reloc = R_PPC_ADDR14_BRTAKEN; break;
- + case BFD_RELOC_PPC_BA16_BRNTAKEN: ppc_reloc = R_PPC_ADDR14_BRNTAKEN; break;
- + case BFD_RELOC_PPC_B26: ppc_reloc = R_PPC_REL24; break;
- + case BFD_RELOC_PPC_B16: ppc_reloc = R_PPC_REL14; break;
- + case BFD_RELOC_PPC_B16_BRTAKEN: ppc_reloc = R_PPC_REL14_BRTAKEN; break;
- + case BFD_RELOC_PPC_B16_BRNTAKEN: ppc_reloc = R_PPC_REL14_BRNTAKEN; break;
- + case BFD_RELOC_16_GOTOFF: ppc_reloc = R_PPC_GOT16; break;
- + case BFD_RELOC_LO16_GOTOFF: ppc_reloc = R_PPC_GOT16_LO; break;
- + case BFD_RELOC_HI16_GOTOFF: ppc_reloc = R_PPC_GOT16_HI; break;
- + case BFD_RELOC_HI16_S_GOTOFF: ppc_reloc = R_PPC_GOT16_HA; break;
- + case BFD_RELOC_24_PLT_PCREL: ppc_reloc = R_PPC_PLTREL24; break;
- + case BFD_RELOC_PPC_COPY: ppc_reloc = R_PPC_COPY; break;
- + case BFD_RELOC_PPC_GLOB_DAT: ppc_reloc = R_PPC_GLOB_DAT; break;
- + case BFD_RELOC_PPC_LOCAL24PC: ppc_reloc = R_PPC_LOCAL24PC; break;
- + case BFD_RELOC_32_PCREL: ppc_reloc = R_PPC_REL32; break;
- + case BFD_RELOC_32_PLTOFF: ppc_reloc = R_PPC_PLT32; break;
- + case BFD_RELOC_32_PLT_PCREL: ppc_reloc = R_PPC_PLTREL32; break;
- + case BFD_RELOC_LO16_PLTOFF: ppc_reloc = R_PPC_PLT16_LO; break;
- + case BFD_RELOC_HI16_PLTOFF: ppc_reloc = R_PPC_PLT16_HI; break;
- + case BFD_RELOC_HI16_S_PLTOFF: ppc_reloc = R_PPC_PLT16_HA; break;
- + case BFD_RELOC_GPREL16: ppc_reloc = R_PPC_SDAREL16; break;
- + case BFD_RELOC_16_BASEREL: ppc_reloc = R_PPC_SECTOFF; break;
- + case BFD_RELOC_LO16_BASEREL: ppc_reloc = R_PPC_SECTOFF_LO; break;
- + case BFD_RELOC_HI16_BASEREL: ppc_reloc = R_PPC_SECTOFF_HI; break;
- + case BFD_RELOC_HI16_S_BASEREL: ppc_reloc = R_PPC_SECTOFF_HA; break;
- + case BFD_RELOC_CTOR: ppc_reloc = R_PPC_ADDR32; break;
- + case BFD_RELOC_PPC_TOC16: ppc_reloc = R_PPC_TOC16; break;
- + case BFD_RELOC_PPC_EMB_NADDR32: ppc_reloc = R_PPC_EMB_NADDR32; break;
- + case BFD_RELOC_PPC_EMB_NADDR16: ppc_reloc = R_PPC_EMB_NADDR16; break;
- + case BFD_RELOC_PPC_EMB_NADDR16_LO: ppc_reloc = R_PPC_EMB_NADDR16_LO; break;
- + case BFD_RELOC_PPC_EMB_NADDR16_HI: ppc_reloc = R_PPC_EMB_NADDR16_HI; break;
- + case BFD_RELOC_PPC_EMB_NADDR16_HA: ppc_reloc = R_PPC_EMB_NADDR16_HA; break;
- + case BFD_RELOC_PPC_EMB_SDAI16: ppc_reloc = R_PPC_EMB_SDAI16; break;
- + case BFD_RELOC_PPC_EMB_SDA2I16: ppc_reloc = R_PPC_EMB_SDA2I16; break;
- + case BFD_RELOC_PPC_EMB_SDA2REL: ppc_reloc = R_PPC_EMB_SDA2REL; break;
- + case BFD_RELOC_PPC_EMB_SDA21: ppc_reloc = R_PPC_EMB_SDA21; break;
- + case BFD_RELOC_PPC_EMB_MRKREF: ppc_reloc = R_PPC_EMB_MRKREF; break;
- + case BFD_RELOC_PPC_EMB_RELSEC16: ppc_reloc = R_PPC_EMB_RELSEC16; break;
- + case BFD_RELOC_PPC_EMB_RELST_LO: ppc_reloc = R_PPC_EMB_RELST_LO; break;
- + case BFD_RELOC_PPC_EMB_RELST_HI: ppc_reloc = R_PPC_EMB_RELST_HI; break;
- + case BFD_RELOC_PPC_EMB_RELST_HA: ppc_reloc = R_PPC_EMB_RELST_HA; break;
- + case BFD_RELOC_PPC_EMB_BIT_FLD: ppc_reloc = R_PPC_EMB_BIT_FLD; break;
- + case BFD_RELOC_PPC_EMB_RELSDA: ppc_reloc = R_PPC_EMB_RELSDA; break;
- + case BFD_RELOC_PPC_MORPHOS_DREL: ppc_reloc = R_PPC_MORPHOS_DREL; break;
- + case BFD_RELOC_PPC_MORPHOS_DREL_LO: ppc_reloc = R_PPC_MORPHOS_DREL_LO; break;
- + case BFD_RELOC_PPC_MORPHOS_DREL_HI: ppc_reloc = R_PPC_MORPHOS_DREL_HI; break;
- + case BFD_RELOC_PPC_MORPHOS_DREL_HA: ppc_reloc = R_PPC_MORPHOS_DREL_HA; break;
- + case BFD_RELOC_VTABLE_INHERIT: ppc_reloc = R_PPC_GNU_VTINHERIT; break;
- + case BFD_RELOC_VTABLE_ENTRY: ppc_reloc = R_PPC_GNU_VTENTRY; break;
- + }
- +
- + return ppc_elf_howto_table[(int) ppc_reloc];
- +};
- +
- +/* Set the howto pointer for a PowerPC ELF reloc. */
- +
- +static void
- +ppc_elf_info_to_howto (abfd, cache_ptr, dst)
- + bfd *abfd ATTRIBUTE_UNUSED;
- + arelent *cache_ptr;
- + Elf32_Internal_Rela *dst;
- +{
- + if (!ppc_elf_howto_table[R_PPC_ADDR32])
- + /* Initialize howto table if needed. */
- + ppc_elf_howto_init ();
- +
- + BFD_ASSERT (ELF32_R_TYPE (dst->r_info) < (unsigned int) R_PPC_max);
- + cache_ptr->howto = ppc_elf_howto_table[ELF32_R_TYPE (dst->r_info)];
- +}
- +
- +/* Handle the R_PPC_ADDR16_HA reloc. */
- +
- +static bfd_reloc_status_type
- +ppc_elf_addr16_ha_reloc (abfd, reloc_entry, symbol, data, input_section,
- + output_bfd, error_message)
- + bfd *abfd ATTRIBUTE_UNUSED;
- + arelent *reloc_entry;
- + asymbol *symbol;
- + PTR data ATTRIBUTE_UNUSED;
- + asection *input_section;
- + bfd *output_bfd;
- + char **error_message ATTRIBUTE_UNUSED;
- +{
- + /*bfd_vma relocation;*/
- +
- + if (output_bfd != NULL)
- + {
- + reloc_entry->address += input_section->output_offset;
- + return bfd_reloc_ok;
- + }
- + else
- + {
- + reloc_entry->address += input_section->output_offset;
- + input_section->output_section->orelocation[input_section->output_section->reloc_count++]=reloc_entry;
- + return bfd_reloc_ok;
- + }
- +
- + /*if (reloc_entry->address > input_section->_cooked_size)
- + return bfd_reloc_outofrange;
- +
- + if (bfd_is_com_section (symbol->section))
- + relocation = 0;
- + else
- + relocation = symbol->value;
- +
- + relocation += symbol->section->output_section->vma;
- + relocation += symbol->section->output_offset;
- + relocation += reloc_entry->addend;
- +
- + reloc_entry->addend += (relocation & 0x8000) << 1;
- +
- + return bfd_reloc_continue;*/
- +}
- +
- +/* Fix bad default arch selected for a 32 bit input bfd when the
- + default is 64 bit. */
- +
- +static boolean
- +ppc_elf_object_p (abfd)
- + bfd *abfd;
- +{
- + if (abfd->arch_info->the_default && abfd->arch_info->bits_per_word == 64)
- + {
- + Elf_Internal_Ehdr *i_ehdr = elf_elfheader (abfd);
- +
- + if (i_ehdr->e_ident[EI_CLASS] == ELFCLASS32)
- + {
- + /* Relies on arch after 64 bit default being 32 bit default. */
- + abfd->arch_info = abfd->arch_info->next;
- + BFD_ASSERT (abfd->arch_info->bits_per_word == 32);
- + }
- + }
- + return true;
- +}
- +
- +/* Function to set whether a module needs the -mrelocatable bit set. */
- +
- +static boolean
- +ppc_elf_set_private_flags (abfd, flags)
- + bfd *abfd;
- + flagword flags;
- +{
- + BFD_ASSERT (!elf_flags_init (abfd)
- + || elf_elfheader (abfd)->e_flags == flags);
- +
- + elf_elfheader (abfd)->e_flags = flags;
- + elf_flags_init (abfd) = true;
- + return true;
- +}
- +
- +/* Merge backend specific data from an object file to the output
- + object file when linking */
- +static boolean
- +ppc_elf_merge_private_bfd_data (ibfd, obfd)
- + bfd *ibfd;
- + bfd *obfd;
- +{
- + flagword old_flags;
- + flagword new_flags;
- + boolean error;
- +
- + /* Check if we have the same endianess */
- + if (! _bfd_generic_verify_endian_match (ibfd, obfd))
- + return false;
- +
- + if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- + || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- + return true;
- +
- + new_flags = elf_elfheader (ibfd)->e_flags;
- + old_flags = elf_elfheader (obfd)->e_flags;
- + if (!elf_flags_init (obfd)) /* First call, no flags set */
- + {
- + elf_flags_init (obfd) = true;
- + elf_elfheader (obfd)->e_flags = new_flags;
- + }
- +
- + else if (new_flags == old_flags) /* Compatible flags are ok */
- + ;
- +
- + else /* Incompatible flags */
- + {
- + /* Warn about -mrelocatable mismatch. Allow -mrelocatable-lib to be linked
- + with either. */
- + error = false;
- + if ((new_flags & EF_PPC_RELOCATABLE) != 0
- + && (old_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0)
- + {
- + error = true;
- + (*_bfd_error_handler)
- + (_("%s: compiled with -mrelocatable and linked with modules compiled normally"),
- + bfd_archive_filename (ibfd));
- + }
- + else if ((new_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0
- + && (old_flags & EF_PPC_RELOCATABLE) != 0)
- + {
- + error = true;
- + (*_bfd_error_handler)
- + (_("%s: compiled normally and linked with modules compiled with -mrelocatable"),
- + bfd_archive_filename (ibfd));
- + }
- +
- + /* The output is -mrelocatable-lib iff both the input files are. */
- + if (! (new_flags & EF_PPC_RELOCATABLE_LIB))
- + elf_elfheader (obfd)->e_flags &= ~EF_PPC_RELOCATABLE_LIB;
- +
- + /* The output is -mrelocatable iff it can't be -mrelocatable-lib,
- + but each input file is either -mrelocatable or -mrelocatable-lib. */
- + if (! (elf_elfheader (obfd)->e_flags & EF_PPC_RELOCATABLE_LIB)
- + && (new_flags & (EF_PPC_RELOCATABLE_LIB | EF_PPC_RELOCATABLE))
- + && (old_flags & (EF_PPC_RELOCATABLE_LIB | EF_PPC_RELOCATABLE)))
- + elf_elfheader (obfd)->e_flags |= EF_PPC_RELOCATABLE;
- +
- + /* Do not warn about eabi vs. V.4 mismatch, just or in the bit if any module uses it */
- + elf_elfheader (obfd)->e_flags |= (new_flags & EF_PPC_EMB);
- +
- + new_flags &= ~ (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB | EF_PPC_EMB);
- + old_flags &= ~ (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB | EF_PPC_EMB);
- +
- + /* Warn about any other mismatches */
- + if (new_flags != old_flags)
- + {
- + error = true;
- + (*_bfd_error_handler)
- + (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
- + bfd_archive_filename (ibfd), (long) new_flags, (long) old_flags);
- + }
- +
- + if (error)
- + {
- + bfd_set_error (bfd_error_bad_value);
- + return false;
- + }
- + }
- +
- + return true;
- +}
- +
- +/* Handle a PowerPC specific section when reading an object file. This
- + is called when elfcode.h finds a section with an unknown type. */
- +
- +static boolean
- +ppc_elf_section_from_shdr (abfd, hdr, name)
- + bfd *abfd;
- + Elf32_Internal_Shdr *hdr;
- + const char *name;
- +{
- + asection *newsect;
- + flagword flags;
- +
- + if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name))
- + return false;
- +
- + newsect = hdr->bfd_section;
- + flags = bfd_get_section_flags (abfd, newsect);
- + if (hdr->sh_flags & SHF_EXCLUDE)
- + flags |= SEC_EXCLUDE;
- +
- + if (hdr->sh_type == SHT_ORDERED)
- + flags |= SEC_SORT_ENTRIES;
- +
- + bfd_set_section_flags (abfd, newsect, flags);
- + return true;
- +}
- +
- +/* Set up any other section flags and such that may be necessary. */
- +
- +static boolean
- +ppc_elf_fake_sections (abfd, shdr, asect)
- + bfd *abfd ATTRIBUTE_UNUSED;
- + Elf32_Internal_Shdr *shdr;
- + asection *asect;
- +{
- + if ((asect->flags & SEC_EXCLUDE) != 0)
- + shdr->sh_flags |= SHF_EXCLUDE;
- +
- + if ((asect->flags & SEC_SORT_ENTRIES) != 0)
- + shdr->sh_type = SHT_ORDERED;
- +
- + return true;
- +}
- +
- +/* Create a special linker section */
- +static elf_linker_section_t *
- +ppc_elf_create_linker_section (abfd, info, which)
- + bfd *abfd;
- + struct bfd_link_info *info;
- + enum elf_linker_section_enum which;
- +{
- + bfd *dynobj = elf_hash_table (info)->dynobj;
- + elf_linker_section_t *lsect;
- +
- + /* Record the first bfd section that needs the special section */
- + if (!dynobj)
- + dynobj = elf_hash_table (info)->dynobj = abfd;
- +
- + /* If this is the first time, create the section */
- + lsect = elf_linker_section (dynobj, which);
- + if (!lsect)
- + {
- + elf_linker_section_t defaults;
- + static elf_linker_section_t zero_section;
- +
- + defaults = zero_section;
- + defaults.which = which;
- + defaults.hole_written_p = false;
- + defaults.alignment = 2;
- +
- + /* Both of these sections are (technically) created by the user
- + putting data in them, so they shouldn't be marked
- + SEC_LINKER_CREATED.
- +
- + The linker creates them so it has somewhere to attach their
- + respective symbols. In fact, if they were empty it would
- + be OK to leave the symbol set to 0 (or any random number), because
- + the appropriate register should never be used. */
- + defaults.flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
- + | SEC_IN_MEMORY);
- +
- + switch (which)
- + {
- + default:
- + (*_bfd_error_handler) (_("%s: Unknown special linker type %d"),
- + bfd_get_filename (abfd),
- + (int) which);
- +
- + bfd_set_error (bfd_error_bad_value);
- + return (elf_linker_section_t *) 0;
- +
- + case LINKER_SECTION_SDATA: /* .sdata/.sbss section */
- + defaults.name = ".sdata";
- + defaults.rel_name = ".rela.sdata";
- + defaults.bss_name = ".sbss";
- + defaults.sym_name = "_SDA_BASE_";
- + defaults.sym_offset = 32768;
- + break;
- +
- + case LINKER_SECTION_SDATA2: /* .sdata2/.sbss2 section */
- + defaults.name = ".sdata2";
- + defaults.rel_name = ".rela.sdata2";
- + defaults.bss_name = ".sbss2";
- + defaults.sym_name = "_SDA2_BASE_";
- + defaults.sym_offset = 32768;
- + defaults.flags |= SEC_READONLY;
- + break;
- + }
- +
- + lsect = _bfd_elf_create_linker_section (abfd, info, which, &defaults);
- + }
- +
- + return lsect;
- +}
- +
- +/* If we have a non-zero sized .sbss2 or .PPC.EMB.sbss0 sections, we
- + need to bump up the number of section headers. */
- +
- +static int
- +ppc_elf_additional_program_headers (abfd)
- + bfd *abfd;
- +{
- + asection *s;
- + int ret;
- +
- + ret = 0;
- +
- + s = bfd_get_section_by_name (abfd, ".interp");
- + if (s != NULL)
- + ++ret;
- +
- + s = bfd_get_section_by_name (abfd, ".sbss2");
- + if (s != NULL && (s->flags & SEC_LOAD) != 0 && s->_raw_size > 0)
- + ++ret;
- +
- + s = bfd_get_section_by_name (abfd, ".PPC.EMB.sbss0");
- + if (s != NULL && (s->flags & SEC_LOAD) != 0 && s->_raw_size > 0)
- + ++ret;
- +
- + return ret;
- +}
- +
- +/* Modify the segment map if needed. */
- +
- +static boolean
- +ppc_elf_modify_segment_map (abfd)
- + bfd *abfd ATTRIBUTE_UNUSED;
- +{
- + return true;
- +}
- +
- +/* The powerpc .got has a blrl instruction in it. Mark it executable. */
- +
- +static asection *
- +ppc_elf_create_got (abfd, info)
- + bfd *abfd;
- + struct bfd_link_info *info;
- +{
- + register asection *s;
- + flagword flags;
- +
- + if (!_bfd_elf_create_got_section (abfd, info))
- + return NULL;
- +
- + s = bfd_get_section_by_name (abfd, ".got");
- + if (s == NULL)
- + abort ();
- +
- + flags = (SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS | SEC_IN_MEMORY
- + | SEC_LINKER_CREATED);
- + if (!bfd_set_section_flags (abfd, s, flags))
- + return NULL;
- + return s;
- +}
- +
- +/* We have to create .dynsbss and .rela.sbss here so that they get mapped
- + to output sections (just like _bfd_elf_create_dynamic_sections has
- + to create .dynbss and .rela.bss). */
- +
- +static boolean
- +ppc_elf_create_dynamic_sections (abfd, info)
- + bfd *abfd;
- + struct bfd_link_info *info;
- +{
- + register asection *s;
- + flagword flags;
- +
- + if (!ppc_elf_create_got (abfd, info))
- + return false;
- +
- + if (!_bfd_elf_create_dynamic_sections (abfd, info))
- + return false;
- +
- + flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
- + | SEC_LINKER_CREATED);
- +
- + s = bfd_make_section (abfd, ".dynsbss");
- + if (s == NULL
- + || ! bfd_set_section_flags (abfd, s, SEC_ALLOC))
- + return false;
- +
- + if (! info->shared)
- + {
- + s = bfd_make_section (abfd, ".rela.sbss");
- + if (s == NULL
- + || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
- + || ! bfd_set_section_alignment (abfd, s, 2))
- + return false;
- + }
- +
- + s = bfd_get_section_by_name (abfd, ".plt");
- + if (s == NULL)
- + abort ();
- +
- + flags = SEC_ALLOC | SEC_CODE | SEC_IN_MEMORY | SEC_LINKER_CREATED;
- + return bfd_set_section_flags (abfd, s, flags);
- +}
- +
- +/* Adjust a symbol defined by a dynamic object and referenced by a
- + regular object. The current definition is in some section of the
- + dynamic object, but we're not including those sections. We have to
- + change the definition to something the rest of the link can
- + understand. */
- +
- +static boolean
- +ppc_elf_adjust_dynamic_symbol (info, h)
- + struct bfd_link_info *info;
- + struct elf_link_hash_entry *h;
- +{
- + bfd *dynobj = elf_hash_table (info)->dynobj;
- + asection *s;
- + unsigned int power_of_two;
- + bfd_vma plt_offset;
- +
- +#ifdef DEBUG
- + fprintf (stderr, "ppc_elf_adjust_dynamic_symbol called for %s\n", h->root.root.string);
- +#endif
- +
- + /* Make sure we know what is going on here. */
- + BFD_ASSERT (dynobj != NULL
- + && ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT)
- + || h->weakdef != NULL
- + || ((h->elf_link_hash_flags
- + & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- + && (h->elf_link_hash_flags
- + & ELF_LINK_HASH_REF_REGULAR) != 0
- + && (h->elf_link_hash_flags
- + & ELF_LINK_HASH_DEF_REGULAR) == 0)));
- +
- + /* If this is a function, put it in the procedure linkage table. We
- + will fill in the contents of the procedure linkage table later,
- + when we know the address of the .got section. */
- + if (h->type == STT_FUNC
- + || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
- + {
- + if (! elf_hash_table (info)->dynamic_sections_created
- + || SYMBOL_CALLS_LOCAL (info, h)
- + || (info->shared && h->plt.refcount <= 0))
- + {
- + /* A PLT entry is not required/allowed when:
- +
- + 1. We are not using ld.so; because then the PLT entry
- + can't be set up, so we can't use one.
- +
- + 2. We know for certain that a call to this symbol
- + will go to this object.
- +
- + 3. GC has rendered the entry unused.
- + Note, however, that in an executable all references to the
- + symbol go to the PLT, so we can't turn it off in that case.
- + ??? The correct thing to do here is to reference count
- + all uses of the symbol, not just those to the GOT or PLT. */
- + h->plt.offset = (bfd_vma) -1;
- + h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
- + return true;
- + }
- +
- + /* Make sure this symbol is output as a dynamic symbol. */
- + if (h->dynindx == -1)
- + {
- + if (! bfd_elf32_link_record_dynamic_symbol (info, h))
- + return false;
- + }
- + BFD_ASSERT (h->dynindx != -1);
- +
- + s = bfd_get_section_by_name (dynobj, ".plt");
- + BFD_ASSERT (s != NULL);
- +
- + /* If this is the first .plt entry, make room for the special
- + first entry. */
- + if (s->_raw_size == 0)
- + s->_raw_size += PLT_INITIAL_ENTRY_SIZE;
- +
- + /* The PowerPC PLT is actually composed of two parts, the first part
- + is 2 words (for a load and a jump), and then there is a remaining
- + word available at the end. */
- + plt_offset = (PLT_INITIAL_ENTRY_SIZE
- + + (PLT_SLOT_SIZE
- + * ((s->_raw_size - PLT_INITIAL_ENTRY_SIZE)
- + / PLT_ENTRY_SIZE)));
- +
- + /* If this symbol is not defined in a regular file, and we are
- + not generating a shared library, then set the symbol to this
- + location in the .plt. This is required to make function
- + pointers compare as equal between the normal executable and
- + the shared library. */
- + if (! info->shared
- + && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- + {
- + h->root.u.def.section = s;
- + h->root.u.def.value = plt_offset;
- + }
- +
- + h->plt.offset = plt_offset;
- +
- + /* Make room for this entry. After the 8192nd entry, room
- + for two entries is allocated. */
- + if ((s->_raw_size - PLT_INITIAL_ENTRY_SIZE) / PLT_ENTRY_SIZE
- + >= PLT_NUM_SINGLE_ENTRIES)
- + s->_raw_size += 2 * PLT_ENTRY_SIZE;
- + else
- + s->_raw_size += PLT_ENTRY_SIZE;
- +
- + /* We also need to make an entry in the .rela.plt section. */
- + s = bfd_get_section_by_name (dynobj, ".rela.plt");
- + BFD_ASSERT (s != NULL);
- + s->_raw_size += sizeof (Elf32_External_Rela);
- +
- + return true;
- + }
- + else
- + h->plt.offset = (bfd_vma) -1;
- +
- + /* If this is a weak symbol, and there is a real definition, the
- + processor independent code will have arranged for us to see the
- + real definition first, and we can just use the same value. */
- + if (h->weakdef != NULL)
- + {
- + BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined
- + || h->weakdef->root.type == bfd_link_hash_defweak);
- + h->root.u.def.section = h->weakdef->root.u.def.section;
- + h->root.u.def.value = h->weakdef->root.u.def.value;
- + return true;
- + }
- +
- + /* This is a reference to a symbol defined by a dynamic object which
- + is not a function. */
- +
- + /* If we are creating a shared library, we must presume that the
- + only references to the symbol are via the global offset table.
- + For such cases we need not do anything here; the relocations will
- + be handled correctly by relocate_section. */
- + if (info->shared)
- + return true;
- +
- + /* We must allocate the symbol in our .dynbss section, which will
- + become part of the .bss section of the executable. There will be
- + an entry for this symbol in the .dynsym section. The dynamic
- + object will contain position independent code, so all references
- + from the dynamic object to this symbol will go through the global
- + offset table. The dynamic linker will use the .dynsym entry to
- + determine the address it must put in the global offset table, so
- + both the dynamic object and the regular object will refer to the
- + same memory location for the variable.
- +
- + Of course, if the symbol is sufficiently small, we must instead
- + allocate it in .sbss. FIXME: It would be better to do this if and
- + only if there were actually SDAREL relocs for that symbol. */
- +
- + if (h->size <= elf_gp_size (dynobj))
- + s = bfd_get_section_by_name (dynobj, ".dynsbss");
- + else
- + s = bfd_get_section_by_name (dynobj, ".dynbss");
- + BFD_ASSERT (s != NULL);
- +
- + /* We must generate a R_PPC_COPY reloc to tell the dynamic linker to
- + copy the initial value out of the dynamic object and into the
- + runtime process image. We need to remember the offset into the
- + .rela.bss section we are going to use. */
- + if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
- + {
- + asection *srel;
- +
- + if (h->size <= elf_gp_size (dynobj))
- + srel = bfd_get_section_by_name (dynobj, ".rela.sbss");
- + else
- + srel = bfd_get_section_by_name (dynobj, ".rela.bss");
- + BFD_ASSERT (srel != NULL);
- + srel->_raw_size += sizeof (Elf32_External_Rela);
- + h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
- + }
- +
- + /* We need to figure out the alignment required for this symbol. I
- + have no idea how ELF linkers handle this. */
- + power_of_two = bfd_log2 (h->size);
- + if (power_of_two > 4)
- + power_of_two = 4;
- +
- + /* Apply the required alignment. */
- + s->_raw_size = BFD_ALIGN (s->_raw_size,
- + (bfd_size_type) (1 << power_of_two));
- + if (power_of_two > bfd_get_section_alignment (dynobj, s))
- + {
- + if (! bfd_set_section_alignment (dynobj, s, power_of_two))
- + return false;
- + }
- +
- + /* Define the symbol as being at this point in the section. */
- + h->root.u.def.section = s;
- + h->root.u.def.value = s->_raw_size;
- +
- + /* Increment the section size to make room for the symbol. */
- + s->_raw_size += h->size;
- +
- + return true;
- +}
- +
- +/* Set the sizes of the dynamic sections. */
- +
- +static boolean
- +ppc_elf_size_dynamic_sections (output_bfd, info)
- + bfd *output_bfd ATTRIBUTE_UNUSED;
- + struct bfd_link_info *info;
- +{
- + bfd *dynobj;
- + asection *s;
- + boolean plt;
- + boolean relocs;
- +
- +#ifdef DEBUG
- + fprintf (stderr, "ppc_elf_size_dynamic_sections called\n");
- +#endif
- +
- + dynobj = elf_hash_table (info)->dynobj;
- + BFD_ASSERT (dynobj != NULL);
- +
- + if (elf_hash_table (info)->dynamic_sections_created)
- + {
- + /* Set the contents of the .interp section to the interpreter. */
- + if (! info->shared)
- + {
- + s = bfd_get_section_by_name (dynobj, ".interp");
- + BFD_ASSERT (s != NULL);
- + s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
- + s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
- + }
- + }
- + else
- + {
- + /* We may have created entries in the .rela.got, .rela.sdata, and
- + .rela.sdata2 sections. However, if we are not creating the
- + dynamic sections, we will not actually use these entries. Reset
- + the size of .rela.got, et al, which will cause it to get
- + stripped from the output file below. */
- + static char *rela_sections[] = { ".rela.got", ".rela.sdata",
- + ".rela.sdata2", ".rela.sbss",
- + (char *) 0 };
- + char **p;
- +
- + for (p = rela_sections; *p != (char *) 0; p++)
- + {
- + s = bfd_get_section_by_name (dynobj, *p);
- + if (s != NULL)
- + s->_raw_size = 0;
- + }
- + }
- +
- + /* The check_relocs and adjust_dynamic_symbol entry points have
- + determined the sizes of the various dynamic sections. Allocate
- + memory for them. */
- + plt = false;
- + relocs = false;
- + for (s = dynobj->sections; s != NULL; s = s->next)
- + {
- + const char *name;
- + boolean strip;
- +
- + if ((s->flags & SEC_LINKER_CREATED) == 0)
- + continue;
- +
- + /* It's OK to base decisions on the section name, because none
- + of the dynobj section names depend upon the input files. */
- + name = bfd_get_section_name (dynobj, s);
- +
- + strip = false;
- +
- + if (strcmp (name, ".plt") == 0)
- + {
- + if (s->_raw_size == 0)
- + {
- + /* Strip this section if we don't need it; see the
- + comment below. */
- + strip = true;
- + }
- + else
- + {
- + /* Remember whether there is a PLT. */
- + plt = true;
- + }
- + }
- + else if (strncmp (name, ".rela", 5) == 0)
- + {
- + if (s->_raw_size == 0)
- + {
- + /* If we don't need this section, strip it from the
- + output file. This is mostly to handle .rela.bss and
- + .rela.plt. We must create both sections in
- + create_dynamic_sections, because they must be created
- + before the linker maps input sections to output
- + sections. The linker does that before
- + adjust_dynamic_symbol is called, and it is that
- + function which decides whether anything needs to go
- + into these sections. */
- + strip = true;
- + }
- + else
- + {
- + /* Remember whether there are any relocation sections. */
- + relocs = true;
- +
- + /* We use the reloc_count field as a counter if we need
- + to copy relocs into the output file. */
- + s->reloc_count = 0;
- + }
- + }
- + else if (strcmp (name, ".got") != 0
- + && strcmp (name, ".sdata") != 0
- + && strcmp (name, ".sdata2") != 0)
- + {
- + /* It's not one of our sections, so don't allocate space. */
- + continue;
- + }
- +
- + if (strip)
- + {
- + _bfd_strip_section_from_output (info, s);
- + continue;
- + }
- +
- + /* Allocate memory for the section contents. */
- + s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
- + if (s->contents == NULL && s->_raw_size != 0)
- + return false;
- + }
- +
- + if (elf_hash_table (info)->dynamic_sections_created)
- + {
- + /* Add some entries to the .dynamic section. We fill in the
- + values later, in ppc_elf_finish_dynamic_sections, but we
- + must add the entries now so that we get the correct size for
- + the .dynamic section. The DT_DEBUG entry is filled in by the
- + dynamic linker and used by the debugger. */
- +#define add_dynamic_entry(TAG, VAL) \
- + bfd_elf32_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
- +
- + if (!info->shared)
- + {
- + if (!add_dynamic_entry (DT_DEBUG, 0))
- + return false;
- + }
- +
- + if (plt)
- + {
- + if (!add_dynamic_entry (DT_PLTGOT, 0)
- + || !add_dynamic_entry (DT_PLTRELSZ, 0)
- + || !add_dynamic_entry (DT_PLTREL, DT_RELA)
- + || !add_dynamic_entry (DT_JMPREL, 0))
- + return false;
- + }
- +
- + if (relocs)
- + {
- + if (!add_dynamic_entry (DT_RELA, 0)
- + || !add_dynamic_entry (DT_RELASZ, 0)
- + || !add_dynamic_entry (DT_RELAENT, sizeof (Elf32_External_Rela)))
- + return false;
- + }
- +
- + if ((info->flags & DF_TEXTREL) != 0)
- + {
- + if (!add_dynamic_entry (DT_TEXTREL, 0))
- + return false;
- + info->flags |= DF_TEXTREL;
- + }
- + }
- +#undef add_dynamic_entry
- +
- + return true;
- +}
- +
- +/* Look through the relocs for a section during the first phase, and
- + allocate space in the global offset table or procedure linkage
- + table. */
- +
- +static boolean
- +ppc_elf_check_relocs (abfd, info, sec, relocs)
- + bfd *abfd;
- + struct bfd_link_info *info;
- + asection *sec;
- + const Elf_Internal_Rela *relocs;
- +{
- + bfd *dynobj;
- + Elf_Internal_Shdr *symtab_hdr;
- + struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
- + const Elf_Internal_Rela *rel;
- + const Elf_Internal_Rela *rel_end;
- + bfd_signed_vma *local_got_refcounts;
- + elf_linker_section_t *sdata;
- + elf_linker_section_t *sdata2;
- + asection *sreloc;
- + asection *sgot = NULL;
- + asection *srelgot = NULL;
- +
- + if (info->relocateable)
- + return true;
- +
- +#ifdef DEBUG
- + fprintf (stderr, "ppc_elf_check_relocs called for section %s in %s\n",
- + bfd_get_section_name (abfd, sec),
- + bfd_archive_filename (abfd));
- +#endif
- +
- + /* Create the linker generated sections all the time so that the
- + special symbols are created. */
- +
- + if ((sdata = elf_linker_section (abfd, LINKER_SECTION_SDATA)) == NULL)
- + {
- + sdata = ppc_elf_create_linker_section (abfd, info, LINKER_SECTION_SDATA);
- + if (!sdata)
- + return false;
- + }
- +
- + if ((sdata2 = elf_linker_section (abfd, LINKER_SECTION_SDATA2)) == NULL)
- + {
- + sdata2 = ppc_elf_create_linker_section (abfd, info, LINKER_SECTION_SDATA2);
- + if (!sdata2)
- + return false;
- + }
- +
- + dynobj = elf_hash_table (info)->dynobj;
- + symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- + local_got_refcounts = elf_local_got_refcounts (abfd);
- +
- + sym_hashes = elf_sym_hashes (abfd);
- + sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof (Elf32_External_Sym);
- + if (!elf_bad_symtab (abfd))
- + sym_hashes_end -= symtab_hdr->sh_info;
- +
- + sreloc = NULL;
- +
- + rel_end = relocs + sec->reloc_count;
- + for (rel = relocs; rel < rel_end; rel++)
- + {
- + unsigned long r_symndx;
- + struct elf_link_hash_entry *h;
- +
- + r_symndx = ELF32_R_SYM (rel->r_info);
- + if (r_symndx < symtab_hdr->sh_info)
- + h = NULL;
- + else
- + h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- +
- + /* If a relocation refers to _GLOBAL_OFFSET_TABLE_, create the .got.
- + This shows up in particular in an R_PPC_ADDR32 in the eabi
- + startup code. */
- + if (h && strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
- + {
- + if (sgot == NULL)
- + {
- + if (dynobj == NULL)
- + elf_hash_table (info)->dynobj = dynobj = abfd;
- + sgot = ppc_elf_create_got (dynobj, info);
- + if (sgot == NULL)
- + return false;
- + }
- + }
- +
- + switch (ELF32_R_TYPE (rel->r_info))
- + {
- + /* GOT16 relocations */
- + case R_PPC_GOT16:
- + case R_PPC_GOT16_LO:
- + case R_PPC_GOT16_HI:
- + case R_PPC_GOT16_HA:
- + /* This symbol requires a global offset table entry. */
- +
- + if (sgot == NULL)
- + {
- + if (dynobj == NULL)
- + elf_hash_table (info)->dynobj = dynobj = abfd;
- + sgot = ppc_elf_create_got (dynobj, info);
- + if (sgot == NULL)
- + return false;
- + }
- +
- + if (srelgot == NULL
- + && (h != NULL || info->shared))
- + {
- + srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
- + if (srelgot == NULL)
- + {
- + srelgot = bfd_make_section (dynobj, ".rela.got");
- + if (srelgot == NULL
- + || ! bfd_set_section_flags (dynobj, srelgot,
- + (SEC_ALLOC
- + | SEC_LOAD
- + | SEC_HAS_CONTENTS
- + | SEC_IN_MEMORY
- + | SEC_LINKER_CREATED
- + | SEC_READONLY))
- + || ! bfd_set_section_alignment (dynobj, srelgot, 2))
- + return false;
- + }
- + }
- +
- + if (h != NULL)
- + {
- + if (h->got.refcount == 0)
- + {
- + /* Make sure this symbol is output as a dynamic symbol. */
- + if (h->dynindx == -1)
- + if (!bfd_elf32_link_record_dynamic_symbol (info, h))
- + return false;
- +
- + /* Allocate space in the .got. */
- + sgot->_raw_size += 4;
- + /* Allocate relocation space. */
- + srelgot->_raw_size += sizeof (Elf32_External_Rela);
- + }
- + h->got.refcount++;
- + }
- + else
- + {
- + /* This is a global offset table entry for a local symbol. */
- + if (local_got_refcounts == NULL)
- + {
- + bfd_size_type size;
- +
- + size = symtab_hdr->sh_info;
- + size *= sizeof (bfd_signed_vma);
- + local_got_refcounts
- + = (bfd_signed_vma *) bfd_zalloc (abfd, size);
- + if (local_got_refcounts == NULL)
- + return false;
- + elf_local_got_refcounts (abfd) = local_got_refcounts;
- + }
- + if (local_got_refcounts[r_symndx] == 0)
- + {
- + sgot->_raw_size += 4;
- +
- + /* If we are generating a shared object, we need to
- + output a R_PPC_RELATIVE reloc so that the
- + dynamic linker can adjust this GOT entry. */
- + if (info->shared)
- + srelgot->_raw_size += sizeof (Elf32_External_Rela);
- + }
- + local_got_refcounts[r_symndx]++;
- + }
- + break;
- +
- + /* Indirect .sdata relocation */
- + case R_PPC_EMB_SDAI16:
- + if (info->shared)
- + {
- + ((*_bfd_error_handler)
- + (_("%s: relocation %s cannot be used when making a shared object"),
- + bfd_archive_filename (abfd), "R_PPC_EMB_SDAI16"));
- + return false;
- + }
- +
- + if (srelgot == NULL && (h != NULL || info->shared))
- + {
- + srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
- + if (srelgot == NULL)
- + {
- + srelgot = bfd_make_section (dynobj, ".rela.got");
- + if (srelgot == NULL
- + || ! bfd_set_section_flags (dynobj, srelgot,
- + (SEC_ALLOC
- + | SEC_LOAD
- + | SEC_HAS_CONTENTS
- + | SEC_IN_MEMORY
- + | SEC_LINKER_CREATED
- + | SEC_READONLY))
- + || ! bfd_set_section_alignment (dynobj, srelgot, 2))
- + return false;
- + }
- + }
- +
- + if (!bfd_elf32_create_pointer_linker_section (abfd, info, sdata, h, rel))
- + return false;
- +
- + break;
- +
- + /* Indirect .sdata2 relocation */
- + case R_PPC_EMB_SDA2I16:
- + if (info->shared)
- + {
- + ((*_bfd_error_handler)
- + (_("%s: relocation %s cannot be used when making a shared object"),
- + bfd_archive_filename (abfd), "R_PPC_EMB_SDA2I16"));
- + return false;
- + }
- +
- + if (srelgot == NULL && (h != NULL || info->shared))
- + {
- + srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
- + if (srelgot == NULL)
- + {
- + srelgot = bfd_make_section (dynobj, ".rela.got");
- + if (srelgot == NULL
- + || ! bfd_set_section_flags (dynobj, srelgot,
- + (SEC_ALLOC
- + | SEC_LOAD
- + | SEC_HAS_CONTENTS
- + | SEC_IN_MEMORY
- + | SEC_LINKER_CREATED
- + | SEC_READONLY))
- + || ! bfd_set_section_alignment (dynobj, srelgot, 2))
- + return false;
- + }
- + }
- +
- + if (!bfd_elf32_create_pointer_linker_section (abfd, info, sdata2, h, rel))
- + return false;
- +
- + break;
- +
- + case R_PPC_SDAREL16:
- + case R_PPC_EMB_SDA2REL:
- + case R_PPC_EMB_SDA21:
- + if (info->shared)
- + {
- + ((*_bfd_error_handler)
- + (_("%s: relocation %s cannot be used when making a shared object"),
- + bfd_archive_filename (abfd),
- + ppc_elf_howto_table[(int) ELF32_R_TYPE (rel->r_info)]->name));
- + return false;
- + }
- + break;
- +
- + case R_PPC_PLT32:
- + case R_PPC_PLTREL24:
- + case R_PPC_PLT16_LO:
- + case R_PPC_PLT16_HI:
- + case R_PPC_PLT16_HA:
- +#ifdef DEBUG
- + fprintf (stderr, "Reloc requires a PLT entry\n");
- +#endif
- + /* This symbol requires a procedure linkage table entry. We
- + actually build the entry in adjust_dynamic_symbol,
- + because this might be a case of linking PIC code without
- + linking in any dynamic objects, in which case we don't
- + need to generate a procedure linkage table after all. */
- +
- + if (h == NULL)
- + {
- + /* It does not make sense to have a procedure linkage
- + table entry for a local symbol. */
- + bfd_set_error (bfd_error_bad_value);
- + return false;
- + }
- +
- + /* Make sure this symbol is output as a dynamic symbol. */
- + if (h->dynindx == -1)
- + {
- + if (! bfd_elf32_link_record_dynamic_symbol (info, h))
- + return false;
- + }
- + h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
- + h->plt.refcount++;
- + break;
- +
- + /* The following relocations don't need to propagate the
- + relocation if linking a shared object since they are
- + section relative. */
- + case R_PPC_SECTOFF:
- + case R_PPC_SECTOFF_LO:
- + case R_PPC_SECTOFF_HI:
- + case R_PPC_SECTOFF_HA:
- + break;
- +
- + /* This refers only to functions defined in the shared library */
- + case R_PPC_LOCAL24PC:
- + break;
- +
- + /* This relocation describes the C++ object vtable hierarchy.
- + Reconstruct it for later use during GC. */
- + case R_PPC_GNU_VTINHERIT:
- + if (!_bfd_elf32_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
- + return false;
- + break;
- +
- + /* This relocation describes which C++ vtable entries are actually
- + used. Record for later use during GC. */
- + case R_PPC_GNU_VTENTRY:
- + if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_addend))
- + return false;
- + break;
- +
- + /* When creating a shared object, we must copy these
- + relocs into the output file. We create a reloc
- + section in dynobj and make room for the reloc. */
- + case R_PPC_REL24:
- + case R_PPC_REL14:
- + case R_PPC_REL14_BRTAKEN:
- + case R_PPC_REL14_BRNTAKEN:
- + case R_PPC_REL32:
- + if (h == NULL
- + || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0
- + || SYMBOL_REFERENCES_LOCAL (info, h))
- + break;
- + /* fall through */
- +
- + default:
- + if (info->shared)
- + {
- +#ifdef DEBUG
- + fprintf (stderr, "ppc_elf_check_relocs need to create relocation for %s\n",
- + (h && h->root.root.string) ? h->root.root.string : "<unknown>");
- +#endif
- + if (sreloc == NULL)
- + {
- + const char *name;
- +
- + name = (bfd_elf_string_from_elf_section
- + (abfd,
- + elf_elfheader (abfd)->e_shstrndx,
- + elf_section_data (sec)->rel_hdr.sh_name));
- + if (name == NULL)
- + return false;
- +
- + BFD_ASSERT (strncmp (name, ".rela", 5) == 0
- + && strcmp (bfd_get_section_name (abfd, sec),
- + name + 5) == 0);
- +
- + sreloc = bfd_get_section_by_name (dynobj, name);
- + if (sreloc == NULL)
- + {
- + flagword flags;
- +
- + sreloc = bfd_make_section (dynobj, name);
- + flags = (SEC_HAS_CONTENTS | SEC_READONLY
- + | SEC_IN_MEMORY | SEC_LINKER_CREATED);
- + if ((sec->flags & SEC_ALLOC) != 0)
- + flags |= SEC_ALLOC | SEC_LOAD;
- + if (sreloc == NULL
- + || ! bfd_set_section_flags (dynobj, sreloc, flags)
- + || ! bfd_set_section_alignment (dynobj, sreloc, 2))
- + return false;
- + }
- + if (sec->flags & SEC_READONLY)
- + info->flags |= DF_TEXTREL;
- + }
- +
- + sreloc->_raw_size += sizeof (Elf32_External_Rela);
- +
- + /* FIXME: We should here do what the m68k and i386
- + backends do: if the reloc is pc-relative, record it
- + in case it turns out that the reloc is unnecessary
- + because the symbol is forced local by versioning or
- + we are linking with -Bdynamic. Fortunately this
- + case is not frequent. */
- + }
- +
- + break;
- + }
- + }
- +
- + return true;
- +}
- +
- +/* Return the section that should be marked against GC for a given
- + relocation. */
- +
- +static asection *
- +ppc_elf_gc_mark_hook (sec, info, rel, h, sym)
- + asection *sec;
- + struct bfd_link_info *info ATTRIBUTE_UNUSED;
- + Elf_Internal_Rela *rel;
- + struct elf_link_hash_entry *h;
- + Elf_Internal_Sym *sym;
- +{
- + if (h != NULL)
- + {
- + switch (ELF32_R_TYPE (rel->r_info))
- + {
- + case R_PPC_GNU_VTINHERIT:
- + case R_PPC_GNU_VTENTRY:
- + break;
- +
- + default:
- + switch (h->root.type)
- + {
- + case bfd_link_hash_defined:
- + case bfd_link_hash_defweak:
- + return h->root.u.def.section;
- +
- + case bfd_link_hash_common:
- + return h->root.u.c.p->section;
- +
- + default:
- + break;
- + }
- + }
- + }
- + else
- + return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
- +
- + return NULL;
- +}
- +
- +/* Update the got entry reference counts for the section being removed. */
- +
- +static boolean
- +ppc_elf_gc_sweep_hook (abfd, info, sec, relocs)
- + bfd *abfd;
- + struct bfd_link_info *info ATTRIBUTE_UNUSED;
- + asection *sec;
- + const Elf_Internal_Rela *relocs;
- +{
- + Elf_Internal_Shdr *symtab_hdr;
- + struct elf_link_hash_entry **sym_hashes;
- + bfd_signed_vma *local_got_refcounts;
- + const Elf_Internal_Rela *rel, *relend;
- + unsigned long r_symndx;
- + struct elf_link_hash_entry *h;
- +
- + symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- + sym_hashes = elf_sym_hashes (abfd);
- + local_got_refcounts = elf_local_got_refcounts (abfd);
- +
- + relend = relocs + sec->reloc_count;
- + for (rel = relocs; rel < relend; rel++)
- + switch (ELF32_R_TYPE (rel->r_info))
- + {
- + case R_PPC_GOT16:
- + case R_PPC_GOT16_LO:
- + case R_PPC_GOT16_HI:
- + case R_PPC_GOT16_HA:
- + r_symndx = ELF32_R_SYM (rel->r_info);
- + if (r_symndx >= symtab_hdr->sh_info)
- + {
- + h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- + if (h->got.refcount > 0)
- + h->got.refcount--;
- + }
- + else if (local_got_refcounts != NULL)
- + {
- + if (local_got_refcounts[r_symndx] > 0)
- + local_got_refcounts[r_symndx]--;
- + }
- + break;
- +
- + case R_PPC_PLT32:
- + case R_PPC_PLTREL24:
- + case R_PPC_PLT16_LO:
- + case R_PPC_PLT16_HI:
- + case R_PPC_PLT16_HA:
- + r_symndx = ELF32_R_SYM (rel->r_info);
- + if (r_symndx >= symtab_hdr->sh_info)
- + {
- + h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- + if (h->plt.refcount > 0)
- + h->plt.refcount--;
- + }
- + break;
- +
- + default:
- + break;
- + }
- +
- + return true;
- +}
- +
- +/* Hook called by the linker routine which adds symbols from an object
- + file. We use it to put .comm items in .sbss, and not .bss. */
- +
- +static boolean
- +ppc_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
- + bfd *abfd;
- + struct bfd_link_info *info;
- + const Elf_Internal_Sym *sym;
- + const char **namep ATTRIBUTE_UNUSED;
- + flagword *flagsp ATTRIBUTE_UNUSED;
- + asection **secp;
- + bfd_vma *valp;
- +{
- + if (sym->st_shndx == SHN_COMMON
- + && !info->relocateable
- + && sym->st_size <= elf_gp_size (abfd)
- + && info->hash->creator->flavour == bfd_target_elf_flavour)
- + {
- + /* Common symbols less than or equal to -G nn bytes are automatically
- + put into .sdata. */
- + elf_linker_section_t *sdata
- + = ppc_elf_create_linker_section (abfd, info, LINKER_SECTION_SDATA);
- +
- + if (!sdata->bss_section)
- + {
- + bfd_size_type amt;
- +
- + /* We don't go through bfd_make_section, because we don't
- + want to attach this common section to DYNOBJ. The linker
- + will move the symbols to the appropriate output section
- + when it defines common symbols. */
- + amt = sizeof (asection);
- + sdata->bss_section = (asection *) bfd_zalloc (abfd, amt);
- + if (sdata->bss_section == NULL)
- + return false;
- + sdata->bss_section->name = sdata->bss_name;
- + sdata->bss_section->flags = SEC_IS_COMMON;
- + sdata->bss_section->output_section = sdata->bss_section;
- + amt = sizeof (asymbol);
- + sdata->bss_section->symbol = (asymbol *) bfd_zalloc (abfd, amt);
- + amt = sizeof (asymbol *);
- + sdata->bss_section->symbol_ptr_ptr =
- + (asymbol **) bfd_zalloc (abfd, amt);
- + if (sdata->bss_section->symbol == NULL
- + || sdata->bss_section->symbol_ptr_ptr == NULL)
- + return false;
- + sdata->bss_section->symbol->name = sdata->bss_name;
- + sdata->bss_section->symbol->flags = BSF_SECTION_SYM;
- + sdata->bss_section->symbol->section = sdata->bss_section;
- + *sdata->bss_section->symbol_ptr_ptr = sdata->bss_section->symbol;
- + }
- +
- + *secp = sdata->bss_section;
- + *valp = sym->st_size;
- + }
- +
- + return true;
- +}
- +
- +/* Finish up dynamic symbol handling. We set the contents of various
- + dynamic sections here. */
- +
- +static boolean
- +ppc_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
- + bfd *output_bfd;
- + struct bfd_link_info *info;
- + struct elf_link_hash_entry *h;
- + Elf_Internal_Sym *sym;
- +{
- + bfd *dynobj;
- +
- +#ifdef DEBUG
- + fprintf (stderr, "ppc_elf_finish_dynamic_symbol called for %s",
- + h->root.root.string);
- +#endif
- +
- + dynobj = elf_hash_table (info)->dynobj;
- + BFD_ASSERT (dynobj != NULL);
- +
- + if (h->plt.offset != (bfd_vma) -1)
- + {
- + asection *splt;
- + asection *srela;
- + Elf_Internal_Rela rela;
- + bfd_vma reloc_index;
- +
- +#ifdef DEBUG
- + fprintf (stderr, ", plt_offset = %d", h->plt.offset);
- +#endif
- +
- + /* This symbol has an entry in the procedure linkage table. Set
- + it up. */
- +
- + BFD_ASSERT (h->dynindx != -1);
- +
- + splt = bfd_get_section_by_name (dynobj, ".plt");
- + srela = bfd_get_section_by_name (dynobj, ".rela.plt");
- + BFD_ASSERT (splt != NULL && srela != NULL);
- +
- + /* We don't need to fill in the .plt. The ppc dynamic linker
- + will fill it in. */
- +
- + /* Fill in the entry in the .rela.plt section. */
- + rela.r_offset = (splt->output_section->vma
- + + splt->output_offset
- + + h->plt.offset);
- + rela.r_info = ELF32_R_INFO (h->dynindx, R_PPC_JMP_SLOT);
- + rela.r_addend = 0;
- +
- + reloc_index = (h->plt.offset - PLT_INITIAL_ENTRY_SIZE) / PLT_SLOT_SIZE;
- + if (reloc_index > PLT_NUM_SINGLE_ENTRIES)
- + reloc_index -= (reloc_index - PLT_NUM_SINGLE_ENTRIES) / 2;
- + bfd_elf32_swap_reloca_out (output_bfd, &rela,
- + ((Elf32_External_Rela *) srela->contents
- + + reloc_index));
- +
- + if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- + {
- + /* Mark the symbol as undefined, rather than as defined in
- + the .plt section. Leave the value alone. */
- + sym->st_shndx = SHN_UNDEF;
- + /* If the symbol is weak, we do need to clear the value.
- + Otherwise, the PLT entry would provide a definition for
- + the symbol even if the symbol wasn't defined anywhere,
- + and so the symbol would never be NULL. */
- + if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK)
- + == 0)
- + sym->st_value = 0;
- + }
- + }
- +
- + if (h->got.offset != (bfd_vma) -1)
- + {
- + asection *sgot;
- + asection *srela;
- + Elf_Internal_Rela rela;
- +
- + /* This symbol has an entry in the global offset table. Set it
- + up. */
- +
- + sgot = bfd_get_section_by_name (dynobj, ".got");
- + srela = bfd_get_section_by_name (dynobj, ".rela.got");
- + BFD_ASSERT (sgot != NULL && srela != NULL);
- +
- + rela.r_offset = (sgot->output_section->vma
- + + sgot->output_offset
- + + (h->got.offset &~ (bfd_vma) 1));
- +
- + /* If this is a -Bsymbolic link, and the symbol is defined
- + locally, we just want to emit a RELATIVE reloc. The entry in
- + the global offset table will already have been initialized in
- + the relocate_section function. */
- + if (info->shared
- + && SYMBOL_REFERENCES_LOCAL (info, h))
- + {
- + rela.r_info = ELF32_R_INFO (0, R_PPC_RELATIVE);
- + rela.r_addend = (h->root.u.def.value
- + + h->root.u.def.section->output_section->vma
- + + h->root.u.def.section->output_offset);
- + }
- + else
- + {
- + BFD_ASSERT ((h->got.offset & 1) == 0);
- + rela.r_info = ELF32_R_INFO (h->dynindx, R_PPC_GLOB_DAT);
- + rela.r_addend = 0;
- + }
- +
- + bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset);
- + bfd_elf32_swap_reloca_out (output_bfd, &rela,
- + ((Elf32_External_Rela *) srela->contents
- + + srela->reloc_count));
- + ++srela->reloc_count;
- + }
- +
- + if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
- + {
- + asection *s;
- + Elf_Internal_Rela rela;
- +
- + /* This symbols needs a copy reloc. Set it up. */
- +
- +#ifdef DEBUG
- + fprintf (stderr, ", copy");
- +#endif
- +
- + BFD_ASSERT (h->dynindx != -1);
- +
- + if (h->size <= elf_gp_size (dynobj))
- + s = bfd_get_section_by_name (h->root.u.def.section->owner,
- + ".rela.sbss");
- + else
- + s = bfd_get_section_by_name (h->root.u.def.section->owner,
- + ".rela.bss");
- + BFD_ASSERT (s != NULL);
- +
- + rela.r_offset = (h->root.u.def.value
- + + h->root.u.def.section->output_section->vma
- + + h->root.u.def.section->output_offset);
- + rela.r_info = ELF32_R_INFO (h->dynindx, R_PPC_COPY);
- + rela.r_addend = 0;
- + bfd_elf32_swap_reloca_out (output_bfd, &rela,
- + ((Elf32_External_Rela *) s->contents
- + + s->reloc_count));
- + ++s->reloc_count;
- + }
- +
- +#ifdef DEBUG
- + fprintf (stderr, "\n");
- +#endif
- +
- + /* Mark some specially defined symbols as absolute. */
- + if (strcmp (h->root.root.string, "_DYNAMIC") == 0
- + || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0
- + || strcmp (h->root.root.string, "_PROCEDURE_LINKAGE_TABLE_") == 0)
- + sym->st_shndx = SHN_ABS;
- +
- + return true;
- +}
- +
- +/* Finish up the dynamic sections. */
- +
- +static boolean
- +ppc_elf_finish_dynamic_sections (output_bfd, info)
- + bfd *output_bfd;
- + struct bfd_link_info *info;
- +{
- + asection *sdyn;
- + bfd *dynobj = elf_hash_table (info)->dynobj;
- + asection *sgot = bfd_get_section_by_name (dynobj, ".got");
- +
- +#ifdef DEBUG
- + fprintf (stderr, "ppc_elf_finish_dynamic_sections called\n");
- +#endif
- +
- + sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
- +
- + if (elf_hash_table (info)->dynamic_sections_created)
- + {
- + asection *splt;
- + Elf32_External_Dyn *dyncon, *dynconend;
- +
- + splt = bfd_get_section_by_name (dynobj, ".plt");
- + BFD_ASSERT (splt != NULL && sdyn != NULL);
- +
- + dyncon = (Elf32_External_Dyn *) sdyn->contents;
- + dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
- + for (; dyncon < dynconend; dyncon++)
- + {
- + Elf_Internal_Dyn dyn;
- + const char *name;
- + boolean size;
- +
- + bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
- +
- + switch (dyn.d_tag)
- + {
- + case DT_PLTGOT: name = ".plt"; size = false; break;
- + case DT_PLTRELSZ: name = ".rela.plt"; size = true; break;
- + case DT_JMPREL: name = ".rela.plt"; size = false; break;
- + default: name = NULL; size = false; break;
- + }
- +
- + if (name != NULL)
- + {
- + asection *s;
- +
- + s = bfd_get_section_by_name (output_bfd, name);
- + if (s == NULL)
- + dyn.d_un.d_val = 0;
- + else
- + {
- + if (! size)
- + dyn.d_un.d_ptr = s->vma;
- + else
- + {
- + if (s->_cooked_size != 0)
- + dyn.d_un.d_val = s->_cooked_size;
- + else
- + dyn.d_un.d_val = s->_raw_size;
- + }
- + }
- + bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
- + }
- + }
- + }
- +
- + /* Add a blrl instruction at _GLOBAL_OFFSET_TABLE_-4 so that a function can
- + easily find the address of the _GLOBAL_OFFSET_TABLE_. */
- + if (sgot)
- + {
- + unsigned char *contents = sgot->contents;
- + bfd_put_32 (output_bfd, (bfd_vma) 0x4e800021 /* blrl */, contents);
- +
- + if (sdyn == NULL)
- + bfd_put_32 (output_bfd, (bfd_vma) 0, contents+4);
- + else
- + bfd_put_32 (output_bfd,
- + sdyn->output_section->vma + sdyn->output_offset,
- + contents+4);
- +
- + elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4;
- + }
- +
- + return true;
- +}
- +
- +/* The RELOCATE_SECTION function is called by the ELF backend linker
- + to handle the relocations for a section.
- +
- + The relocs are always passed as Rela structures; if the section
- + actually uses Rel structures, the r_addend field will always be
- + zero.
- +
- + This function is responsible for adjust the section contents as
- + necessary, and (if using Rela relocs and generating a
- + relocateable output file) adjusting the reloc addend as
- + necessary.
- +
- + This function does not have to worry about setting the reloc
- + address or the reloc symbol index.
- +
- + LOCAL_SYMS is a pointer to the swapped in local symbols.
- +
- + LOCAL_SECTIONS is an array giving the section in the input file
- + corresponding to the st_shndx field of each local symbol.
- +
- + The global hash table entry for the global symbols can be found
- + via elf_sym_hashes (input_bfd).
- +
- + When generating relocateable output, this function must handle
- + STB_LOCAL/STT_SECTION symbols specially. The output symbol is
- + going to be the section symbol corresponding to the output
- + section, which means that the addend must be adjusted
- + accordingly. */
- +
- +static boolean
- +ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
- + contents, relocs, local_syms, local_sections)
- + bfd *output_bfd;
- + struct bfd_link_info *info;
- + bfd *input_bfd;
- + asection *input_section;
- + bfd_byte *contents;
- + Elf_Internal_Rela *relocs;
- + Elf_Internal_Sym *local_syms;
- + asection **local_sections;
- +{
- + Elf_Internal_Shdr *symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
- + struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
- + bfd *dynobj = elf_hash_table (info)->dynobj;
- + elf_linker_section_t *sdata = (dynobj) ? elf_linker_section (dynobj, LINKER_SECTION_SDATA) : NULL;
- + elf_linker_section_t *sdata2 = (dynobj) ? elf_linker_section (dynobj, LINKER_SECTION_SDATA2) : NULL;
- + Elf_Internal_Rela *rel = relocs;
- + Elf_Internal_Rela *relend = relocs + input_section->reloc_count;
- + asection *sreloc = NULL;
- + asection *splt;
- + asection *sgot;
- + bfd_vma *local_got_offsets;
- + boolean ret = true;
- + long insn;
- + asection *sdata_sec = NULL;
- + asection *sbss_sec = NULL;
- +
- +#ifdef DEBUG
- + fprintf (stderr, "ppc_elf_relocate_section called for %s section %s, %ld relocations%s\n",
- + bfd_archive_filename (input_bfd),
- + bfd_section_name(input_bfd, input_section),
- + (long) input_section->reloc_count,
- + (info->relocateable) ? " (relocatable)" : "");
- +#endif
- +
- + if (info->relocateable)
- + return true;
- +
- + if (!ppc_elf_howto_table[R_PPC_ADDR32])
- + /* Initialize howto table if needed. */
- + ppc_elf_howto_init ();
- +
- + if (!strcmp(bfd_section_name(output_bfd, input_section), ".sdata") ||
- + !strcmp(bfd_section_name(output_bfd, input_section), ".sbss"))
- + {
- + sdata_sec = bfd_get_section_by_name(output_bfd, ".sdata");
- + if (sdata_sec)
- + sdata_sec = sdata_sec->output_section;
- + sbss_sec = bfd_get_section_by_name(output_bfd, ".sbss");
- + if (sbss_sec)
- + sbss_sec = sbss_sec->output_section;
- + }
- +
- + local_got_offsets = elf_local_got_offsets (input_bfd);
- +
- + splt = sgot = NULL;
- + if (dynobj != NULL)
- + {
- + splt = bfd_get_section_by_name (dynobj, ".plt");
- + sgot = bfd_get_section_by_name (dynobj, ".got");
- + }
- +
- + for (; rel < relend; rel++)
- + {
- + enum elf_ppc_reloc_type r_type = (enum elf_ppc_reloc_type)ELF32_R_TYPE (rel->r_info);
- + bfd_vma offset = rel->r_offset;
- + bfd_vma addend = rel->r_addend;
- + bfd_reloc_status_type r = bfd_reloc_other;
- + Elf_Internal_Sym *sym = (Elf_Internal_Sym *) 0;
- + asection *sec = (asection *) 0;
- + struct elf_link_hash_entry *h = (struct elf_link_hash_entry *) 0;
- + const char *sym_name = (const char *) 0;
- + boolean copy = false;
- + reloc_howto_type *howto;
- + unsigned long r_symndx;
- + bfd_vma relocation;
- + int will_become_local;
- +
- + /* Unknown relocation handling */
- + if ((unsigned) r_type >= (unsigned) R_PPC_max
- + || !ppc_elf_howto_table[(int) r_type])
- + {
- + (*_bfd_error_handler) (_("%s: unknown relocation type %d"),
- + bfd_archive_filename (input_bfd),
- + (int) r_type);
- +
- + bfd_set_error (bfd_error_bad_value);
- + ret = false;
- + continue;
- + }
- +
- + howto = ppc_elf_howto_table[(int) r_type];
- + r_symndx = ELF32_R_SYM (rel->r_info);
- +
- + if (r_symndx < symtab_hdr->sh_info)
- + {
- + sym = local_syms + r_symndx;
- + sec = local_sections[r_symndx];
- + sym_name = "<local symbol>";
- +
- + relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
- + addend = rel->r_addend;
- + /* Relocs to local symbols are always resolved. */
- + will_become_local = 1;
- + }
- + else
- + {
- + h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- + while (h->root.type == bfd_link_hash_indirect
- + || h->root.type == bfd_link_hash_warning)
- + h = (struct elf_link_hash_entry *) h->root.u.i.link;
- + sym_name = h->root.root.string;
- +
- + /* Can this relocation be resolved immediately? */
- + will_become_local = SYMBOL_REFERENCES_LOCAL (info, h);
- +
- + if (h->root.type == bfd_link_hash_defined
- + || h->root.type == bfd_link_hash_defweak)
- + {
- + sec = h->root.u.def.section;
- + if (((r_type == R_PPC_PLT32
- + || r_type == R_PPC_PLTREL24)
- + && splt != NULL
- + && h->plt.offset != (bfd_vma) -1)
- + || (r_type == R_PPC_LOCAL24PC
- + && sec->output_section == NULL)
- + || ((r_type == R_PPC_GOT16
- + || r_type == R_PPC_GOT16_LO
- + || r_type == R_PPC_GOT16_HI
- + || r_type == R_PPC_GOT16_HA)
- + && elf_hash_table (info)->dynamic_sections_created
- + && (! info->shared || ! will_become_local))
- + || (info->shared
- + && ! will_become_local
- + && ((input_section->flags & SEC_ALLOC) != 0
- + /* Testing SEC_DEBUGGING here may be wrong.
- + It's here to avoid a crash when
- + generating a shared library with DWARF
- + debugging information. */
- + || ((input_section->flags & SEC_DEBUGGING) != 0
- + && (h->elf_link_hash_flags
- + & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
- + && (r_type == R_PPC_ADDR32
- + || r_type == R_PPC_ADDR24
- + || r_type == R_PPC_ADDR16
- + || r_type == R_PPC_ADDR16_LO
- + || r_type == R_PPC_ADDR16_HI
- + || r_type == R_PPC_ADDR16_HA
- + || r_type == R_PPC_ADDR14
- + || r_type == R_PPC_ADDR14_BRTAKEN
- + || r_type == R_PPC_ADDR14_BRNTAKEN
- + || r_type == R_PPC_COPY
- + || r_type == R_PPC_GLOB_DAT
- + || r_type == R_PPC_JMP_SLOT
- + || r_type == R_PPC_UADDR32
- + || r_type == R_PPC_UADDR16
- + || r_type == R_PPC_SDAREL16
- + || r_type == R_PPC_EMB_NADDR32
- + || r_type == R_PPC_EMB_NADDR16
- + || r_type == R_PPC_EMB_NADDR16_LO
- + || r_type == R_PPC_EMB_NADDR16_HI
- + || r_type == R_PPC_EMB_NADDR16_HA
- + || r_type == R_PPC_EMB_SDAI16
- + || r_type == R_PPC_EMB_SDA2I16
- + || r_type == R_PPC_EMB_SDA2REL
- + || r_type == R_PPC_EMB_SDA21
- + || r_type == R_PPC_EMB_MRKREF
- + || r_type == R_PPC_EMB_BIT_FLD
- + || r_type == R_PPC_EMB_RELSDA
- + || ((r_type == R_PPC_REL24
- + || r_type == R_PPC_REL32
- + || r_type == R_PPC_REL14
- + || r_type == R_PPC_REL14_BRTAKEN
- + || r_type == R_PPC_REL14_BRNTAKEN
- + || r_type == R_PPC_RELATIVE)
- + && strcmp (h->root.root.string,
- + "_GLOBAL_OFFSET_TABLE_") != 0))))
- + {
- + /* In these cases, we don't need the relocation
- + value. We check specially because in some
- + obscure cases sec->output_section will be NULL. */
- + relocation = 0;
- + }
- + else if (sec->output_section == NULL)
- + {
- + (*_bfd_error_handler)
- + (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
- + bfd_archive_filename (input_bfd), h->root.root.string,
- + bfd_get_section_name (input_bfd, input_section));
- + relocation = 0;
- + }
- + else
- + relocation = (h->root.u.def.value
- + + sec->output_section->vma
- + + sec->output_offset);
- + }
- + else if (h->root.type == bfd_link_hash_undefweak)
- + relocation = 0;
- + else if (info->shared
- + && (!info->symbolic || info->allow_shlib_undefined)
- + && !info->no_undefined
- + && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
- + relocation = 0;
- + else
- + {
- + if (! (*info->callbacks->undefined_symbol) (info,
- + h->root.root.string,
- + input_bfd,
- + input_section,
- + rel->r_offset,
- + (!info->shared
- + || info->no_undefined
- + || ELF_ST_VISIBILITY (h->other))))
- + return false;
- + relocation = 0;
- + }
- + }
- +
- + switch ((int) r_type)
- + {
- + default:
- + (*_bfd_error_handler) (_("%s: unknown relocation type %d for symbol %s"),
- + bfd_archive_filename (input_bfd),
- + (int) r_type, sym_name);
- +
- + bfd_set_error (bfd_error_bad_value);
- + ret = false;
- + continue;
- +
- + case (int) R_PPC_NONE:
- + continue;
- +
- + /* Relocations that need no special processing. */
- + case (int) R_PPC_LOCAL24PC:
- + /* It makes no sense to point a local relocation
- + at a symbol not in this object. */
- + if (h != NULL
- + && (h->root.type == bfd_link_hash_defined
- + || h->root.type == bfd_link_hash_defweak)
- + && sec->output_section == NULL)
- + {
- + if (! (*info->callbacks->undefined_symbol) (info,
- + h->root.root.string,
- + input_bfd,
- + input_section,
- + rel->r_offset,
- + true))
- + return false;
- + continue;
- + }
- + break;
- +
- + /* Relocations that may need to be propagated if this is a shared
- + object. */
- + case (int) R_PPC_REL24:
- + case (int) R_PPC_REL32:
- + case (int) R_PPC_REL14:
- + /* If these relocations are not to a named symbol, they can be
- + handled right here, no need to bother the dynamic linker. */
- + if (info->shared && (h == NULL
- + || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0
- + || SYMBOL_REFERENCES_LOCAL (info, h)))
- + break;
- + /* fall through */
- +
- + /* Relocations that always need to be propagated if this is a shared
- + object. */
- + case (int) R_PPC_ADDR32:
- + case (int) R_PPC_ADDR24:
- + case (int) R_PPC_ADDR16:
- + case (int) R_PPC_ADDR16_LO:
- + case (int) R_PPC_ADDR16_HI:
- + case (int) R_PPC_ADDR16_HA:
- + case (int) R_PPC_ADDR14:
- + case (int) R_PPC_UADDR32:
- + case (int) R_PPC_UADDR16:
- + if (info->shared && r_symndx != 0)
- + {
- + Elf_Internal_Rela outrel;
- + int skip;
- +
- +#ifdef DEBUG
- + fprintf (stderr, "ppc_elf_relocate_section need to create relocation for %s\n",
- + (h && h->root.root.string) ? h->root.root.string : "<unknown>");
- +#endif
- +
- + /* When generating a shared object, these relocations
- + are copied into the output file to be resolved at run
- + time. */
- +
- + if (sreloc == NULL)
- + {
- + const char *name;
- +
- + name = (bfd_elf_string_from_elf_section
- + (input_bfd,
- + elf_elfheader (input_bfd)->e_shstrndx,
- + elf_section_data (input_section)->rel_hdr.sh_name));
- + if (name == NULL)
- + return false;
- +
- + BFD_ASSERT (strncmp (name, ".rela", 5) == 0
- + && strcmp (bfd_get_section_name (input_bfd,
- + input_section),
- + name + 5) == 0);
- +
- + sreloc = bfd_get_section_by_name (dynobj, name);
- + BFD_ASSERT (sreloc != NULL);
- + }
- +
- + skip = 0;
- +
- + outrel.r_offset =
- + _bfd_elf_section_offset (output_bfd, info, input_section,
- + rel->r_offset);
- + if (outrel.r_offset == (bfd_vma) -1
- + || outrel.r_offset == (bfd_vma) -2)
- + skip = (int) outrel.r_offset;
- + outrel.r_offset += (input_section->output_section->vma
- + + input_section->output_offset);
- +
- + if (skip)
- + memset (&outrel, 0, sizeof outrel);
- + /* h->dynindx may be -1 if this symbol was marked to
- + become local. */
- + else if (! will_become_local)
- + {
- + outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
- + outrel.r_addend = rel->r_addend;
- + }
- + else
- + {
- + if (r_type == R_PPC_ADDR32)
- + {
- + outrel.r_info = ELF32_R_INFO (0, R_PPC_RELATIVE);
- + outrel.r_addend = relocation + rel->r_addend;
- + }
- + else
- + {
- + long indx;
- +
- + if (h == NULL)
- + sec = local_sections[r_symndx];
- + else
- + {
- + BFD_ASSERT (h->root.type == bfd_link_hash_defined
- + || (h->root.type
- + == bfd_link_hash_defweak));
- + sec = h->root.u.def.section;
- + }
- + if (sec != NULL && bfd_is_abs_section (sec))
- + indx = 0;
- + else if (sec == NULL || sec->owner == NULL)
- + {
- + bfd_set_error (bfd_error_bad_value);
- + return false;
- + }
- + else
- + {
- + asection *osec;
- +
- + osec = sec->output_section;
- + indx = elf_section_data (osec)->dynindx;
- + BFD_ASSERT (indx > 0);
- +#ifdef DEBUG
- + if (indx <= 0)
- + {
- + printf ("indx=%d section=%s flags=%08x name=%s\n",
- + indx, osec->name, osec->flags,
- + h->root.root.string);
- + }
- +#endif
- + }
- +
- + outrel.r_info = ELF32_R_INFO (indx, r_type);
- + outrel.r_addend = relocation + rel->r_addend;
- + }
- + }
- +
- + bfd_elf32_swap_reloca_out (output_bfd, &outrel,
- + (((Elf32_External_Rela *)
- + sreloc->contents)
- + + sreloc->reloc_count));
- + ++sreloc->reloc_count;
- +
- + if (skip == -1)
- + continue;
- +
- + /* This reloc will be computed at runtime. We clear the memory
- + so that it contains predictable value. */
- + if (! skip
- + && ((input_section->flags & SEC_ALLOC) != 0
- + || ELF32_R_TYPE (outrel.r_info) != R_PPC_RELATIVE))
- + {
- + relocation = howto->pc_relative ? outrel.r_offset : 0;
- + addend = 0;
- + break;
- + }
- + }
- + else if (r_type == R_PPC_REL24 || r_type == R_PPC_REL14)
- + {
- + if (sec->output_section != input_section->output_section)
- + {
- + (*_bfd_error_handler) ("%s: The target (%s) of a %s relocation is in the wrong section (%s)",
- + bfd_get_filename (input_bfd),
- + sym_name,
- + ppc_elf_howto_table[ (int)r_type ]->name,
- + bfd_get_section_name (abfd, sec));
- + bfd_set_error (bfd_error_bad_value);
- + ret = false;
- + continue;
- + }
- + break;
- + }
- + else if (r_type == R_PPC_REL32)
- + {
- + if (sec->output_section != input_section->output_section)
- + copy = true;
- + else
- + break;
- + }
- + else if (ddr_ptr && sec && r_type == R_PPC_ADDR32 &&
- + (sec->output_section == sdata_sec ||
- + sec->output_section == sbss_sec ||
- + !strcmp(bfd_get_section_name(abfd, sec), "COMMON") ||
- + !strcmp(bfd_get_section_name(abfd, sec), ".data") ||
- + !strcmp(bfd_get_section_name(abfd, sec), ".bss")) &&
- + (input_section->output_section == sdata_sec ||
- + input_section->output_section == sbss_sec ||
- + !strcmp(bfd_get_section_name(abfd, input_section), "COMMON") ||
- + !strcmp(bfd_get_section_name(abfd, input_section), ".data") ||
- + !strcmp(bfd_get_section_name(abfd, input_section), ".bss")))
- + {
- + ++ddr_count;
- + *ddr_ptr++ = input_section->output_offset + offset;
- + copy = true;
- + break;
- + }
- + else if (sec && !bfd_is_abs_section(sec))
- + {
- + copy = true;
- + break;
- + }
- +
- + if (copy && ddr_ptr && sec &&
- + (sec->output_section == sdata_sec ||
- + sec->output_section == sbss_sec ||
- + !strcmp(bfd_get_section_name(abfd, sec), "COMMON") ||
- + !strcmp(bfd_get_section_name(abfd, sec), ".data") ||
- + !strcmp(bfd_get_section_name(abfd, sec), ".bss")) /*&&
- + (r_type != R_PPC_ADDR32 ||
- + !(input_section->output_section == sdata_sec->output_section ||
- + input_section->output_section == sbss_sec->output_section ||
- + !strcmp(bfd_get_section_name(abfd, input_section), "COMMON") ||
- + !strcmp(bfd_get_section_name(abfd, input_section), ".data") ||
- + !strcmp(bfd_get_section_name(abfd, input_section), ".bss")))*/)
- + {
- + (*_bfd_error_handler) ("%s: The target (%s) of a %s relocation is in the wrong section (%s)",
- + bfd_get_filename (input_bfd),
- + sym_name,
- + ppc_elf_howto_table[ (int)r_type ]->name,
- + bfd_get_section_name (abfd, sec));
- + bfd_set_error (bfd_error_bad_value);
- + ret = false;
- + continue;
- + }
- +
- + /* Arithmetic adjust relocations that aren't going into a
- + shared object. */
- + if (r_type == R_PPC_ADDR16_HA
- + /* It's just possible that this symbol is a weak symbol
- + that's not actually defined anywhere. In that case,
- + 'sec' would be NULL, and we should leave the symbol
- + alone (it will be set to zero elsewhere in the link). */
- + && sec != NULL)
- + {
- + addend += ((relocation + addend) & 0x8000) << 1;
- + }
- + break;
- +
- + /* branch taken prediction relocations */
- + case (int) R_PPC_ADDR14_BRTAKEN:
- + case (int) R_PPC_REL14_BRTAKEN:
- + insn = bfd_get_32 (output_bfd, contents + offset);
- + if ((relocation - offset) & 0x8000)
- + insn &= ~BRANCH_PREDICT_BIT;
- + else
- + insn |= BRANCH_PREDICT_BIT;
- + bfd_put_32 (output_bfd, (bfd_vma) insn, contents + offset);
- + break;
- +
- + /* branch not taken predicition relocations */
- + case (int) R_PPC_ADDR14_BRNTAKEN:
- + case (int) R_PPC_REL14_BRNTAKEN:
- + insn = bfd_get_32 (output_bfd, contents + offset);
- + if ((relocation - offset) & 0x8000)
- + insn |= BRANCH_PREDICT_BIT;
- + else
- + insn &= ~BRANCH_PREDICT_BIT;
- + bfd_put_32 (output_bfd, (bfd_vma) insn, contents + offset);
- + break;
- +
- + /* GOT16 relocations */
- + case (int) R_PPC_GOT16:
- + case (int) R_PPC_GOT16_LO:
- + case (int) R_PPC_GOT16_HI:
- + case (int) R_PPC_GOT16_HA:
- + /* Relocation is to the entry for this symbol in the global
- + offset table. */
- + BFD_ASSERT (sgot != NULL);
- +
- + if (h != NULL)
- + {
- + bfd_vma off;
- +
- + off = h->got.offset;
- + BFD_ASSERT (off != (bfd_vma) -1);
- +
- + if (! elf_hash_table (info)->dynamic_sections_created
- + || (info->shared
- + && SYMBOL_REFERENCES_LOCAL (info, h)))
- + {
- + /* This is actually a static link, or it is a
- + -Bsymbolic link and the symbol is defined
- + locally. We must initialize this entry in the
- + global offset table. Since the offset must
- + always be a multiple of 4, we use the least
- + significant bit to record whether we have
- + initialized it already.
- +
- + When doing a dynamic link, we create a .rela.got
- + relocation entry to initialize the value. This
- + is done in the finish_dynamic_symbol routine. */
- + if ((off & 1) != 0)
- + off &= ~1;
- + else
- + {
- + bfd_put_32 (output_bfd, relocation,
- + sgot->contents + off);
- + h->got.offset |= 1;
- + }
- + }
- +
- + relocation = sgot->output_offset + off - 4;
- + }
- + else
- + {
- + bfd_vma off;
- +
- + BFD_ASSERT (local_got_offsets != NULL
- + && local_got_offsets[r_symndx] != (bfd_vma) -1);
- +
- + off = local_got_offsets[r_symndx];
- +
- + /* The offset must always be a multiple of 4. We use
- + the least significant bit to record whether we have
- + already processed this entry. */
- + if ((off & 1) != 0)
- + off &= ~1;
- + else
- + {
- +
- + if (info->shared)
- + {
- + asection *srelgot;
- + Elf_Internal_Rela outrel;
- +
- + /* We need to generate a R_PPC_RELATIVE reloc
- + for the dynamic linker. */
- + srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
- + BFD_ASSERT (srelgot != NULL);
- +
- + outrel.r_offset = (sgot->output_section->vma
- + + sgot->output_offset
- + + off);
- + outrel.r_info = ELF32_R_INFO (0, R_PPC_RELATIVE);
- + outrel.r_addend = relocation;
- + bfd_elf32_swap_reloca_out (output_bfd, &outrel,
- + (((Elf32_External_Rela *)
- + srelgot->contents)
- + + srelgot->reloc_count));
- + ++srelgot->reloc_count;
- + relocation = 0;
- + }
- +
- + bfd_put_32 (output_bfd, relocation, sgot->contents + off);
- + local_got_offsets[r_symndx] |= 1;
- + }
- +
- + relocation = sgot->output_offset + off - 4;
- + }
- + break;
- +
- + /* Indirect .sdata relocation */
- + case (int) R_PPC_EMB_SDAI16:
- + BFD_ASSERT (sdata != NULL);
- + relocation = bfd_elf32_finish_pointer_linker_section (output_bfd, input_bfd, info,
- + sdata, h, relocation, rel,
- + R_PPC_RELATIVE);
- + break;
- +
- + /* Indirect .sdata2 relocation */
- + case (int) R_PPC_EMB_SDA2I16:
- + BFD_ASSERT (sdata2 != NULL);
- + relocation = bfd_elf32_finish_pointer_linker_section (output_bfd, input_bfd, info,
- + sdata2, h, relocation, rel,
- + R_PPC_RELATIVE);
- + break;
- +
- + /* Handle the TOC16 reloc. We want to use the offset within the .got
- + section, not the actual VMA. This is appropriate when generating
- + an embedded ELF object, for which the .got section acts like the
- + AIX .toc section. */
- + case (int) R_PPC_TOC16: /* phony GOT16 relocations */
- + BFD_ASSERT (sec != (asection *) 0);
- + BFD_ASSERT (bfd_is_und_section (sec)
- + || strcmp (bfd_get_section_name (abfd, sec), ".got") == 0
- + || strcmp (bfd_get_section_name (abfd, sec), ".cgot") == 0)
- +
- + addend -= sec->output_section->vma + sec->output_offset + 0x8000;
- + break;
- +
- + case (int) R_PPC_PLTREL24:
- + /* Relocation is to the entry for this symbol in the
- + procedure linkage table. */
- + BFD_ASSERT (h != NULL);
- +
- + if (h->plt.offset == (bfd_vma) -1
- + || splt == NULL)
- + {
- + /* We didn't make a PLT entry for this symbol. This
- + happens when statically linking PIC code, or when
- + using -Bsymbolic. */
- + break;
- + }
- +
- + relocation = (splt->output_section->vma
- + + splt->output_offset
- + + h->plt.offset);
- + break;
- +
- + /* relocate against _SDA_BASE_ */
- + case (int) R_PPC_SDAREL16:
- + {
- + const char *name;
- +
- + BFD_ASSERT (sec != (asection *) 0);
- + name = bfd_get_section_name (abfd, sec->output_section);
- + if (strcmp (name, ".sdata") != 0
- + && strcmp (name, ".sbss") != 0)
- + {
- + (*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
- + bfd_archive_filename (input_bfd),
- + sym_name,
- + ppc_elf_howto_table[(int) r_type]->name,
- + name);
- + }
- + addend -= (sdata->sym_hash->root.u.def.value
- + + sdata->sym_hash->root.u.def.section->output_section->vma
- + /*+ sdata->sym_hash->root.u.def.section->output_offset*/);
- + }
- + break;
- +
- + /* relocate against _SDA_BASE_, in large data mode */
- + case (int)R_PPC_MORPHOS_DREL:
- + case (int)R_PPC_MORPHOS_DREL_LO:
- + case (int)R_PPC_MORPHOS_DREL_HI:
- + case (int)R_PPC_MORPHOS_DREL_HA:
- + BFD_ASSERT (sec != (asection *)0);
- + if (strcmp (bfd_get_section_name (abfd, sec), ".sdata") != 0
- + && strcmp (bfd_get_section_name (abfd, sec), ".data") != 0
- + && strcmp (bfd_get_section_name (abfd, sec), ".bss") != 0
- + && strcmp (bfd_get_section_name (abfd, sec), ".sbss") != 0
- + && strcmp (bfd_get_section_name (abfd, sec), "COMMON") != 0)
- + {
- + (*_bfd_error_handler) ("%s: The target (%s) of a %s relocation is in the wrong section (%s)",
- + bfd_get_filename (input_bfd),
- + sym_name,
- + ppc_elf_howto_table[ (int)r_type ]->name,
- + bfd_get_section_name (abfd, sec));
- +
- + bfd_set_error (bfd_error_bad_value);
- + ret = false;
- + continue;
- + }
- + /*printf("DREL: addend = %x, sdata->val = %x, vma = %x, output_offset = %x\n",
- + addend, sdata->sym_hash->root.u.def.value,
- + sdata->sym_hash->root.u.def.section->output_section->vma,
- + sdata->sym_hash->root.u.def.section->output_offset);*/
- + addend -= (sdata->sym_hash->root.u.def.value
- + + sdata->sym_hash->root.u.def.section->output_section->vma
- + /*+ sdata->sym_hash->root.u.def.section->output_offset*/);
- + if (r_type == R_PPC_MORPHOS_DREL_HA)
- + addend += ((relocation + addend) & 0x8000) << 1;
- + break;
- +
- + /* relocate against _SDA2_BASE_ */
- + case (int) R_PPC_EMB_SDA2REL:
- + {
- + const char *name;
- +
- + BFD_ASSERT (sec != (asection *) 0);
- + name = bfd_get_section_name (abfd, sec->output_section);
- + if (strcmp (name, ".sdata2") != 0 && strcmp (name, ".sbss2") != 0)
- + {
- + (*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
- + bfd_archive_filename (input_bfd),
- + sym_name,
- + ppc_elf_howto_table[(int) r_type]->name,
- + name);
- +
- + bfd_set_error (bfd_error_bad_value);
- + ret = false;
- + continue;
- + }
- + addend -= (sdata2->sym_hash->root.u.def.value
- + + sdata2->sym_hash->root.u.def.section->output_section->vma
- + + sdata2->sym_hash->root.u.def.section->output_offset);
- + }
- + break;
- +
- + /* relocate against either _SDA_BASE_, _SDA2_BASE_, or 0 */
- + case (int) R_PPC_EMB_SDA21:
- + case (int) R_PPC_EMB_RELSDA:
- + {
- + const char *name;
- + int reg;
- +
- + BFD_ASSERT (sec != (asection *) 0);
- + name = bfd_get_section_name (abfd, sec->output_section);
- + if (strcmp (name, ".sdata") == 0 || strcmp (name, ".sbss") == 0)
- + {
- + reg = 13;
- + addend -= (sdata->sym_hash->root.u.def.value
- + + sdata->sym_hash->root.u.def.section->output_section->vma
- + + sdata->sym_hash->root.u.def.section->output_offset);
- + }
- +
- + else if (strcmp (name, ".sdata2") == 0
- + || strcmp (name, ".sbss2") == 0)
- + {
- + reg = 2;
- + addend -= (sdata2->sym_hash->root.u.def.value
- + + sdata2->sym_hash->root.u.def.section->output_section->vma
- + + sdata2->sym_hash->root.u.def.section->output_offset);
- + }
- +
- + else if (strcmp (name, ".PPC.EMB.sdata0") == 0
- + || strcmp (name, ".PPC.EMB.sbss0") == 0)
- + {
- + reg = 0;
- + }
- +
- + else
- + {
- + (*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
- + bfd_archive_filename (input_bfd),
- + sym_name,
- + ppc_elf_howto_table[(int) r_type]->name,
- + name);
- +
- + bfd_set_error (bfd_error_bad_value);
- + ret = false;
- + continue;
- + }
- +
- + if (r_type == R_PPC_EMB_SDA21)
- + { /* fill in register field */
- + insn = bfd_get_32 (output_bfd, contents + offset);
- + insn = (insn & ~RA_REGISTER_MASK) | (reg << RA_REGISTER_SHIFT);
- + bfd_put_32 (output_bfd, (bfd_vma) insn, contents + offset);
- + }
- + }
- + break;
- +
- + /* Relocate against the beginning of the section */
- + case (int) R_PPC_SECTOFF:
- + case (int) R_PPC_SECTOFF_LO:
- + case (int) R_PPC_SECTOFF_HI:
- + BFD_ASSERT (sec != (asection *) 0);
- + addend -= sec->output_section->vma;
- + break;
- +
- + case (int) R_PPC_SECTOFF_HA:
- + BFD_ASSERT (sec != (asection *) 0);
- + addend -= sec->output_section->vma;
- + addend += ((relocation + addend) & 0x8000) << 1;
- + break;
- +
- + /* Negative relocations */
- + case (int) R_PPC_EMB_NADDR32:
- + case (int) R_PPC_EMB_NADDR16:
- + case (int) R_PPC_EMB_NADDR16_LO:
- + case (int) R_PPC_EMB_NADDR16_HI:
- + addend -= 2 * relocation;
- + break;
- +
- + case (int) R_PPC_EMB_NADDR16_HA:
- + addend -= 2 * relocation;
- + addend += ((relocation + addend) & 0x8000) << 1;
- + break;
- +
- + /* NOP relocation that prevents garbage collecting linkers from omitting a
- + reference. */
- + case (int) R_PPC_EMB_MRKREF:
- + continue;
- +
- + case (int) R_PPC_COPY:
- + case (int) R_PPC_GLOB_DAT:
- + case (int) R_PPC_JMP_SLOT:
- + case (int) R_PPC_RELATIVE:
- + case (int) R_PPC_PLT32:
- + case (int) R_PPC_PLTREL32:
- + case (int) R_PPC_PLT16_LO:
- + case (int) R_PPC_PLT16_HI:
- + case (int) R_PPC_PLT16_HA:
- + case (int) R_PPC_EMB_RELSEC16:
- + case (int) R_PPC_EMB_RELST_LO:
- + case (int) R_PPC_EMB_RELST_HI:
- + case (int) R_PPC_EMB_RELST_HA:
- + case (int) R_PPC_EMB_BIT_FLD:
- + (*_bfd_error_handler) (_("%s: Relocation %s is not yet supported for symbol %s."),
- + bfd_archive_filename (input_bfd),
- + ppc_elf_howto_table[(int) r_type]->name,
- + sym_name);
- +
- + bfd_set_error (bfd_error_invalid_operation);
- + ret = false;
- + continue;
- +
- + case (int) R_PPC_GNU_VTINHERIT:
- + case (int) R_PPC_GNU_VTENTRY:
- + /* These are no-ops in the end. */
- + continue;
- + }
- +
- +#ifdef DEBUG
- + fprintf (stderr, "\ttype = %s (%d), name = %s, symbol index = %ld, offset = %ld, addend = %ld\n",
- + howto->name,
- + (int) r_type,
- + sym_name,
- + r_symndx,
- + (long) offset,
- + (long) addend);
- +#endif
- + if (copy)
- + {
- + Elf_Internal_Rela outrel;
- +
- + if (sec == NULL) /* Don't know if it is possible... */
- + abort();
- +
- + /*printf("copying reloc %d, addend=%x, rel=%x, indx=%d, offset=%x, sec_vma=%x\n",
- + r_type,addend,relocation,sec->output_section->target_index,
- + sec->output_offset,sec->output_section->vma);*/
- +
- + outrel.r_info = ELF32_R_INFO(sec->output_section->target_index, r_type);
- + outrel.r_addend = relocation + addend - sec->output_section->vma;
- + outrel.r_offset = input_section->output_offset + offset;
- +
- + bfd_elf32_swap_reloca_out (output_bfd, &outrel,
- + (((Elf32_External_Rela *)
- + elf_section_data(input_section->output_section)->
- + rel_hdr.contents)
- + + input_section->output_section->reloc_count));
- + ++input_section->output_section->reloc_count;
- + }
- + else
- + {
- + /*printf("applying reloc %d, sym=%s addend=%x, rel=%x, indx=%d, offset=%x, sec_vma=%x\n",
- + r_type,sym_name,addend,relocation,sec->output_section->target_index,
- + sec->output_offset,sec->output_section->vma);*/
- +
- + r = _bfd_final_link_relocate (howto,
- + input_bfd,
- + input_section,
- + contents,
- + offset,
- + relocation,
- + addend);
- +
- + if (r == bfd_reloc_ok)
- + ;
- + else if (r == bfd_reloc_overflow)
- + {
- + const char *name;
- +
- + if (h != NULL)
- + {
- + if (h->root.type == bfd_link_hash_undefweak
- + && howto->pc_relative)
- + {
- + /* Assume this is a call protected by other code that
- + detect the symbol is undefined. If this is the case,
- + we can safely ignore the overflow. If not, the
- + program is hosed anyway, and a little warning isn't
- + going to help. */
- +
- + continue;
- + }
- +
- + name = h->root.root.string;
- + }
- + else
- + {
- + name = bfd_elf_string_from_elf_section (input_bfd,
- + symtab_hdr->sh_link,
- + sym->st_name);
- + if (name == NULL)
- + continue;
- + if (*name == '\0')
- + name = bfd_section_name (input_bfd, sec);
- + }
- +
- + if (! (*info->callbacks->reloc_overflow) (info,
- + name,
- + howto->name,
- + (bfd_vma) 0,
- + input_bfd,
- + input_section,
- + offset))
- + return false;
- + }
- + else
- + ret = false;
- + }
- + }
- +
- +#ifdef DEBUG
- + fprintf (stderr, "\n");
- +#endif
- +
- + return ret;
- +}
- +
- +static enum elf_reloc_type_class
- +ppc_elf_reloc_type_class (rela)
- + const Elf_Internal_Rela *rela;
- +{
- + switch ((int) ELF32_R_TYPE (rela->r_info))
- + {
- + case R_PPC_RELATIVE:
- + return reloc_class_relative;
- + case R_PPC_REL24:
- + case R_PPC_ADDR24:
- + case R_PPC_JMP_SLOT:
- + return reloc_class_plt;
- + case R_PPC_COPY:
- + return reloc_class_copy;
- + default:
- + return reloc_class_normal;
- + }
- +}
- +
- +/* Support for core dump NOTE sections */
- +static boolean
- +ppc_elf_grok_prstatus (abfd, note)
- + bfd *abfd;
- + Elf_Internal_Note *note;
- +{
- + int offset;
- + unsigned int raw_size;
- +
- + switch (note->descsz)
- + {
- + default:
- + return false;
- +
- + case 268: /* Linux/PPC */
- + /* pr_cursig */
- + elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
- +
- + /* pr_pid */
- + elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24);
- +
- + /* pr_reg */
- + offset = 72;
- + raw_size = 192;
- +
- + break;
- + }
- +
- + /* Make a ".reg/999" section. */
- + return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- + raw_size, note->descpos + offset);
- +}
- +
- +static boolean
- +ppc_elf_grok_psinfo (abfd, note)
- + bfd *abfd;
- + Elf_Internal_Note *note;
- +{
- + switch (note->descsz)
- + {
- + default:
- + return false;
- +
- + case 128: /* Linux/PPC elf_prpsinfo */
- + elf_tdata (abfd)->core_program
- + = _bfd_elfcore_strndup (abfd, note->descdata + 32, 16);
- + elf_tdata (abfd)->core_command
- + = _bfd_elfcore_strndup (abfd, note->descdata + 48, 80);
- + }
- +
- + /* Note that for some reason, a spurious space is tacked
- + onto the end of the args in some (at least one anyway)
- + implementations, so strip it off if it exists. */
- +
- + {
- + char *command = elf_tdata (abfd)->core_command;
- + int n = strlen (command);
- +
- + if (0 < n && command[n - 1] == ' ')
- + command[n - 1] = '\0';
- + }
- +
- + return true;
- +}
- +
- +/* Special MorphOS final link routine. */
- +/* This is almost the same as the elf one, except for the hanling of relocations */
- +
- +/* A structure we use to avoid passing large numbers of arguments. */
- +
- +struct elf_final_link_info
- +{
- + /* General link information. */
- + struct bfd_link_info *info;
- + /* Output BFD. */
- + bfd *output_bfd;
- + /* Symbol string table. */
- + struct bfd_strtab_hash *symstrtab;
- + /* .dynsym section. */
- + asection *dynsym_sec;
- + /* .hash section. */
- + asection *hash_sec;
- + /* symbol version section (.gnu.version). */
- + asection *symver_sec;
- + /* first SHF_TLS section (if any). */
- + asection *first_tls_sec;
- + /* Buffer large enough to hold contents of any section. */
- + bfd_byte *contents;
- + /* Buffer large enough to hold external relocs of any section. */
- + PTR external_relocs;
- + /* Buffer large enough to hold internal relocs of any section. */
- + Elf_Internal_Rela *internal_relocs;
- + /* Buffer large enough to hold external local symbols of any input
- + BFD. */
- + Elf_External_Sym *external_syms;
- + /* And a buffer for symbol section indices. */
- + Elf_External_Sym_Shndx *locsym_shndx;
- + /* Buffer large enough to hold internal local symbols of any input
- + BFD. */
- + Elf_Internal_Sym *internal_syms;
- + /* Array large enough to hold a symbol index for each local symbol
- + of any input BFD. */
- + long *indices;
- + /* Array large enough to hold a section pointer for each local
- + symbol of any input BFD. */
- + asection **sections;
- + /* Buffer to hold swapped out symbols. */
- + Elf_External_Sym *symbuf;
- + /* And one for symbol section indices. */
- + Elf_External_Sym_Shndx *symshndxbuf;
- + /* Number of swapped out symbols in buffer. */
- + size_t symbuf_count;
- + /* Number of symbols which fit in symbuf. */
- + size_t symbuf_size;
- +};
- +
- +static boolean elf_link_output_sym
- + PARAMS ((struct elf_final_link_info *, const char *,
- + Elf_Internal_Sym *, asection *));
- +static boolean elf_link_flush_output_syms
- + PARAMS ((struct elf_final_link_info *));
- +static boolean elf_link_output_extsym
- + PARAMS ((struct elf_link_hash_entry *, PTR));
- +static boolean elf_link_sec_merge_syms
- + PARAMS ((struct elf_link_hash_entry *, PTR));
- +static boolean elf_link_check_versioned_symbol
- + PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
- +static boolean elf_link_input_bfd
- + PARAMS ((struct elf_final_link_info *, bfd *));
- +static boolean elf_reloc_link_order
- + PARAMS ((bfd *, struct bfd_link_info *, asection *,
- + struct bfd_link_order *));
- +
- +static boolean elf_section_ignore_discarded_relocs
- + PARAMS ((asection *));
- +
- +/* This struct is used to pass information to elf_link_output_extsym. */
- +
- +struct elf_outext_info
- +{
- + boolean failed;
- + boolean localsyms;
- + struct elf_final_link_info *finfo;
- +};
- +
- +/* Compute the size of, and allocate space for, REL_HDR which is the
- + section header for a section containing relocations for O. */
- +
- +static boolean
- +elf_link_size_reloc_section (abfd, rel_hdr, o)
- + bfd *abfd;
- + Elf_Internal_Shdr *rel_hdr;
- + asection *o;
- +{
- + bfd_size_type reloc_count;
- + bfd_size_type num_rel_hashes;
- +
- + /* Figure out how many relocations there will be. */
- + if (rel_hdr == &elf_section_data (o)->rel_hdr)
- + reloc_count = elf_section_data (o)->rel_count;
- + else
- + reloc_count = elf_section_data (o)->rel_count2;
- +
- + num_rel_hashes = o->reloc_count;
- + if (num_rel_hashes < reloc_count)
- + num_rel_hashes = reloc_count;
- +
- + /* That allows us to calculate the size of the section. */
- + rel_hdr->sh_size = rel_hdr->sh_entsize * reloc_count;
- +
- + /* The contents field must last into write_object_contents, so we
- + allocate it with bfd_alloc rather than malloc. Also since we
- + cannot be sure that the contents will actually be filled in,
- + we zero the allocated space. */
- + rel_hdr->contents = (PTR) bfd_zalloc (abfd, rel_hdr->sh_size);
- + if (rel_hdr->contents == NULL && rel_hdr->sh_size != 0)
- + return false;
- +
- + /* We only allocate one set of hash entries, so we only do it the
- + first time we are called. */
- + if (elf_section_data (o)->rel_hashes == NULL
- + && num_rel_hashes)
- + {
- + struct elf_link_hash_entry **p;
- +
- + p = ((struct elf_link_hash_entry **)
- + bfd_zmalloc (num_rel_hashes
- + * sizeof (struct elf_link_hash_entry *)));
- + if (p == NULL)
- + return false;
- +
- + elf_section_data (o)->rel_hashes = p;
- + }
- +
- + return true;
- +}
- +
- +/* When performing a relocateable link, the input relocations are
- + preserved. But, if they reference global symbols, the indices
- + referenced must be updated. Update all the relocations in
- + REL_HDR (there are COUNT of them), using the data in REL_HASH. */
- +
- +static void
- +elf_link_adjust_relocs (abfd, rel_hdr, count, rel_hash)
- + bfd *abfd;
- + Elf_Internal_Shdr *rel_hdr;
- + unsigned int count;
- + struct elf_link_hash_entry **rel_hash;
- +{
- + unsigned int i;
- + struct elf_backend_data *bed = get_elf_backend_data (abfd);
- + Elf_Internal_Rel *irel;
- + Elf_Internal_Rela *irela;
- + bfd_size_type amt = sizeof (Elf_Internal_Rel) * bed->s->int_rels_per_ext_rel;
- +
- + irel = (Elf_Internal_Rel *) bfd_zmalloc (amt);
- + if (irel == NULL)
- + {
- + (*_bfd_error_handler) (_("Error: out of memory"));
- + abort ();
- + }
- +
- + amt = sizeof (Elf_Internal_Rela) * bed->s->int_rels_per_ext_rel;
- + irela = (Elf_Internal_Rela *) bfd_zmalloc (amt);
- + if (irela == NULL)
- + {
- + (*_bfd_error_handler) (_("Error: out of memory"));
- + abort ();
- + }
- +
- + for (i = 0; i < count; i++, rel_hash++)
- + {
- + if (*rel_hash == NULL)
- + continue;
- +
- + BFD_ASSERT ((*rel_hash)->indx >= 0);
- +
- + if (rel_hdr->sh_entsize == sizeof (Elf_External_Rel))
- + {
- + Elf_External_Rel *erel;
- + unsigned int j;
- +
- + erel = (Elf_External_Rel *) rel_hdr->contents + i;
- + if (bed->s->swap_reloc_in)
- + (*bed->s->swap_reloc_in) (abfd, (bfd_byte *) erel, irel);
- + else
- + elf_swap_reloc_in (abfd, erel, irel);
- +
- + for (j = 0; j < bed->s->int_rels_per_ext_rel; j++)
- + irel[j].r_info = ELF_R_INFO ((*rel_hash)->indx,
- + ELF_R_TYPE (irel[j].r_info));
- +
- + if (bed->s->swap_reloc_out)
- + (*bed->s->swap_reloc_out) (abfd, irel, (bfd_byte *) erel);
- + else
- + elf_swap_reloc_out (abfd, irel, erel);
- + }
- + else
- + {
- + Elf_External_Rela *erela;
- + unsigned int j;
- +
- + BFD_ASSERT (rel_hdr->sh_entsize
- + == sizeof (Elf_External_Rela));
- +
- + erela = (Elf_External_Rela *) rel_hdr->contents + i;
- + if (bed->s->swap_reloca_in)
- + (*bed->s->swap_reloca_in) (abfd, (bfd_byte *) erela, irela);
- + else
- + elf_swap_reloca_in (abfd, erela, irela);
- +
- + for (j = 0; j < bed->s->int_rels_per_ext_rel; j++)
- + irela[j].r_info = ELF_R_INFO ((*rel_hash)->indx,
- + ELF_R_TYPE (irela[j].r_info));
- +
- + if (bed->s->swap_reloca_out)
- + (*bed->s->swap_reloca_out) (abfd, irela, (bfd_byte *) erela);
- + else
- + elf_swap_reloca_out (abfd, irela, erela);
- + }
- + }
- +
- + free (irel);
- + free (irela);
- +}
- +
- +struct elf_link_sort_rela
- +{
- + bfd_vma offset;
- + enum elf_reloc_type_class type;
- + union
- + {
- + Elf_Internal_Rel rel;
- + Elf_Internal_Rela rela;
- + } u;
- +};
- +
- +static int
- +elf_link_sort_cmp1 (A, B)
- + const PTR A;
- + const PTR B;
- +{
- + struct elf_link_sort_rela *a = (struct elf_link_sort_rela *) A;
- + struct elf_link_sort_rela *b = (struct elf_link_sort_rela *) B;
- + int relativea, relativeb;
- +
- + relativea = a->type == reloc_class_relative;
- + relativeb = b->type == reloc_class_relative;
- +
- + if (relativea < relativeb)
- + return 1;
- + if (relativea > relativeb)
- + return -1;
- + if (ELF_R_SYM (a->u.rel.r_info) < ELF_R_SYM (b->u.rel.r_info))
- + return -1;
- + if (ELF_R_SYM (a->u.rel.r_info) > ELF_R_SYM (b->u.rel.r_info))
- + return 1;
- + if (a->u.rel.r_offset < b->u.rel.r_offset)
- + return -1;
- + if (a->u.rel.r_offset > b->u.rel.r_offset)
- + return 1;
- + return 0;
- +}
- +
- +static int
- +elf_link_sort_cmp2 (A, B)
- + const PTR A;
- + const PTR B;
- +{
- + struct elf_link_sort_rela *a = (struct elf_link_sort_rela *) A;
- + struct elf_link_sort_rela *b = (struct elf_link_sort_rela *) B;
- + int copya, copyb;
- +
- + if (a->offset < b->offset)
- + return -1;
- + if (a->offset > b->offset)
- + return 1;
- + copya = (a->type == reloc_class_copy) * 2 + (a->type == reloc_class_plt);
- + copyb = (b->type == reloc_class_copy) * 2 + (b->type == reloc_class_plt);
- + if (copya < copyb)
- + return -1;
- + if (copya > copyb)
- + return 1;
- + if (a->u.rel.r_offset < b->u.rel.r_offset)
- + return -1;
- + if (a->u.rel.r_offset > b->u.rel.r_offset)
- + return 1;
- + return 0;
- +}
- +
- +static size_t
- +elf_link_sort_relocs (abfd, info, psec)
- + bfd *abfd;
- + struct bfd_link_info *info;
- + asection **psec;
- +{
- + bfd *dynobj = elf_hash_table (info)->dynobj;
- + asection *reldyn, *o;
- + boolean rel = false;
- + bfd_size_type count, size;
- + size_t i, j, ret;
- + struct elf_link_sort_rela *rela;
- + struct elf_backend_data *bed = get_elf_backend_data (abfd);
- +
- + reldyn = bfd_get_section_by_name (abfd, ".rela.dyn");
- + if (reldyn == NULL || reldyn->_raw_size == 0)
- + {
- + reldyn = bfd_get_section_by_name (abfd, ".rel.dyn");
- + if (reldyn == NULL || reldyn->_raw_size == 0)
- + return 0;
- + rel = true;
- + count = reldyn->_raw_size / sizeof (Elf_External_Rel);
- + }
- + else
- + count = reldyn->_raw_size / sizeof (Elf_External_Rela);
- +
- + size = 0;
- + for (o = dynobj->sections; o != NULL; o = o->next)
- + if ((o->flags & (SEC_HAS_CONTENTS|SEC_LINKER_CREATED))
- + == (SEC_HAS_CONTENTS|SEC_LINKER_CREATED)
- + && o->output_section == reldyn)
- + size += o->_raw_size;
- +
- + if (size != reldyn->_raw_size)
- + return 0;
- +
- + rela = (struct elf_link_sort_rela *) bfd_zmalloc (sizeof (*rela) * count);
- + if (rela == NULL)
- + {
- + (*info->callbacks->warning)
- + (info, _("Not enough memory to sort relocations"), 0, abfd, 0,
- + (bfd_vma) 0);
- + return 0;
- + }
- +
- + for (o = dynobj->sections; o != NULL; o = o->next)
- + if ((o->flags & (SEC_HAS_CONTENTS|SEC_LINKER_CREATED))
- + == (SEC_HAS_CONTENTS|SEC_LINKER_CREATED)
- + && o->output_section == reldyn)
- + {
- + if (rel)
- + {
- + Elf_External_Rel *erel, *erelend;
- + struct elf_link_sort_rela *s;
- +
- + erel = (Elf_External_Rel *) o->contents;
- + erelend = (Elf_External_Rel *) (o->contents + o->_raw_size);
- + s = rela + o->output_offset / sizeof (Elf_External_Rel);
- + for (; erel < erelend; erel++, s++)
- + {
- + if (bed->s->swap_reloc_in)
- + (*bed->s->swap_reloc_in) (abfd, (bfd_byte *) erel, &s->u.rel);
- + else
- + elf_swap_reloc_in (abfd, erel, &s->u.rel);
- +
- + s->type = (*bed->elf_backend_reloc_type_class) (&s->u.rela);
- + }
- + }
- + else
- + {
- + Elf_External_Rela *erela, *erelaend;
- + struct elf_link_sort_rela *s;
- +
- + erela = (Elf_External_Rela *) o->contents;
- + erelaend = (Elf_External_Rela *) (o->contents + o->_raw_size);
- + s = rela + o->output_offset / sizeof (Elf_External_Rela);
- + for (; erela < erelaend; erela++, s++)
- + {
- + if (bed->s->swap_reloca_in)
- + (*bed->s->swap_reloca_in) (dynobj, (bfd_byte *) erela,
- + &s->u.rela);
- + else
- + elf_swap_reloca_in (dynobj, erela, &s->u.rela);
- +
- + s->type = (*bed->elf_backend_reloc_type_class) (&s->u.rela);
- + }
- + }
- + }
- +
- + qsort (rela, (size_t) count, sizeof (*rela), elf_link_sort_cmp1);
- + for (ret = 0; ret < count && rela[ret].type == reloc_class_relative; ret++)
- + ;
- + for (i = ret, j = ret; i < count; i++)
- + {
- + if (ELF_R_SYM (rela[i].u.rel.r_info) != ELF_R_SYM (rela[j].u.rel.r_info))
- + j = i;
- + rela[i].offset = rela[j].u.rel.r_offset;
- + }
- + qsort (rela + ret, (size_t) count - ret, sizeof (*rela), elf_link_sort_cmp2);
- +
- + for (o = dynobj->sections; o != NULL; o = o->next)
- + if ((o->flags & (SEC_HAS_CONTENTS|SEC_LINKER_CREATED))
- + == (SEC_HAS_CONTENTS|SEC_LINKER_CREATED)
- + && o->output_section == reldyn)
- + {
- + if (rel)
- + {
- + Elf_External_Rel *erel, *erelend;
- + struct elf_link_sort_rela *s;
- +
- + erel = (Elf_External_Rel *) o->contents;
- + erelend = (Elf_External_Rel *) (o->contents + o->_raw_size);
- + s = rela + o->output_offset / sizeof (Elf_External_Rel);
- + for (; erel < erelend; erel++, s++)
- + {
- + if (bed->s->swap_reloc_out)
- + (*bed->s->swap_reloc_out) (abfd, &s->u.rel,
- + (bfd_byte *) erel);
- + else
- + elf_swap_reloc_out (abfd, &s->u.rel, erel);
- + }
- + }
- + else
- + {
- + Elf_External_Rela *erela, *erelaend;
- + struct elf_link_sort_rela *s;
- +
- + erela = (Elf_External_Rela *) o->contents;
- + erelaend = (Elf_External_Rela *) (o->contents + o->_raw_size);
- + s = rela + o->output_offset / sizeof (Elf_External_Rela);
- + for (; erela < erelaend; erela++, s++)
- + {
- + if (bed->s->swap_reloca_out)
- + (*bed->s->swap_reloca_out) (dynobj, &s->u.rela,
- + (bfd_byte *) erela);
- + else
- + elf_swap_reloca_out (dynobj, &s->u.rela, erela);
- + }
- + }
- + }
- +
- + free (rela);
- + *psec = reldyn;
- + return ret;
- +}
- +
- +/* Do the final step of an ELF link. */
- +
- +boolean
- +ppc_elf_final_link (abfd, info)
- + bfd *abfd;
- + struct bfd_link_info *info;
- +{
- + boolean dynamic;
- + boolean emit_relocs;
- + bfd *dynobj;
- + struct elf_final_link_info finfo;
- + register asection *o;
- + register struct bfd_link_order *p;
- + register bfd *sub;
- + bfd_size_type max_contents_size;
- + bfd_size_type max_external_reloc_size;
- + bfd_size_type max_internal_reloc_count;
- + bfd_size_type max_sym_count;
- + bfd_size_type max_sym_shndx_count;
- + bfd_size_type max_datadata_reloc_count;
- + file_ptr off;
- + Elf_Internal_Sym elfsym;
- + unsigned int i;
- + Elf_Internal_Shdr *symtab_hdr;
- + Elf_Internal_Shdr *symstrtab_hdr;
- + struct elf_backend_data *bed = get_elf_backend_data (abfd);
- + struct elf_outext_info eoinfo;
- + boolean merged;
- + size_t relativecount = 0;
- + asection *reldyn = 0;
- + bfd_size_type amt;
- + asection *ddr_sec;
- + asection *sdata_sec = NULL;
- + asection *sbss_sec = NULL;
- +
- + if (! is_elf_hash_table (info))
- + return false;
- +
- + if (info->shared)
- + abfd->flags |= DYNAMIC;
- +
- + bfd_set_start_address(abfd, 0);
- +
- + dynamic = elf_hash_table (info)->dynamic_sections_created;
- + dynobj = elf_hash_table (info)->dynobj;
- +
- + emit_relocs = (info->relocateable
- + || info->emitrelocations
- + || bed->elf_backend_emit_relocs);
- +
- + finfo.info = info;
- + finfo.output_bfd = abfd;
- + finfo.symstrtab = elf_stringtab_init ();
- + if (finfo.symstrtab == NULL)
- + return false;
- +
- + if (! dynamic)
- + {
- + finfo.dynsym_sec = NULL;
- + finfo.hash_sec = NULL;
- + finfo.symver_sec = NULL;
- + }
- + else
- + {
- + finfo.dynsym_sec = bfd_get_section_by_name (dynobj, ".dynsym");
- + finfo.hash_sec = bfd_get_section_by_name (dynobj, ".hash");
- + BFD_ASSERT (finfo.dynsym_sec != NULL && finfo.hash_sec != NULL);
- + finfo.symver_sec = bfd_get_section_by_name (dynobj, ".gnu.version");
- + /* Note that it is OK if symver_sec is NULL. */
- + }
- +
- + finfo.contents = NULL;
- + finfo.external_relocs = NULL;
- + finfo.internal_relocs = NULL;
- + finfo.external_syms = NULL;
- + finfo.locsym_shndx = NULL;
- + finfo.internal_syms = NULL;
- + finfo.indices = NULL;
- + finfo.sections = NULL;
- + finfo.symbuf = NULL;
- + finfo.symshndxbuf = NULL;
- + finfo.symbuf_count = 0;
- + finfo.first_tls_sec = NULL;
- + for (o = abfd->sections; o != (asection *) NULL; o = o->next)
- + if ((o->flags & SEC_THREAD_LOCAL) != 0
- + && (o->flags & SEC_LOAD) != 0)
- + {
- + finfo.first_tls_sec = o;
- + break;
- + }
- +
- + ddr_sec = bfd_get_section_by_name(abfd, "ddrelocs");
- +
- + /* Count up the number of relocations we will output for each output
- + section, so that we know the sizes of the reloc sections. We
- + also figure out some maximum sizes. */
- + max_contents_size = 0;
- + max_external_reloc_size = 0;
- + max_internal_reloc_count = 0;
- + max_sym_count = 0;
- + max_sym_shndx_count = 0;
- + max_datadata_reloc_count = 0;
- + merged = false;
- + for (o = abfd->sections; o != (asection *) NULL; o = o->next)
- + {
- + o->reloc_count = 0;
- +
- + for (p = o->link_order_head; p != NULL; p = p->next)
- + {
- + if (p->type == bfd_section_reloc_link_order
- + || p->type == bfd_symbol_reloc_link_order)
- + ++o->reloc_count;
- + else if (p->type == bfd_indirect_link_order)
- + {
- + asection *sec;
- +
- + sec = p->u.indirect.section;
- +
- + /* Mark all sections which are to be included in the
- + link. This will normally be every section. We need
- + to do this so that we can identify any sections which
- + the linker has decided to not include. */
- + sec->linker_mark = true;
- +
- + if (sec->flags & SEC_MERGE)
- + merged = true;
- +
- + /* Maximum number of relocations */
- + if (1 || info->relocateable || info->emitrelocations)
- + o->reloc_count += sec->reloc_count;
- + else if (bed->elf_backend_count_relocs)
- + {
- + Elf_Internal_Rela * relocs;
- +
- + relocs = (NAME(_bfd_elf,link_read_relocs)
- + (abfd, sec, (PTR) NULL,
- + (Elf_Internal_Rela *) NULL, info->keep_memory));
- +
- + o->reloc_count
- + += (*bed->elf_backend_count_relocs) (sec, relocs);
- +
- + if (elf_section_data (o)->relocs != relocs)
- + free (relocs);
- + }
- +
- + if (sec->_raw_size > max_contents_size)
- + max_contents_size = sec->_raw_size;
- + if (sec->_cooked_size > max_contents_size)
- + max_contents_size = sec->_cooked_size;
- +
- + /* We are interested in just local symbols, not all
- + symbols. */
- + if (bfd_get_flavour (sec->owner) == bfd_target_elf_flavour
- + && (sec->owner->flags & DYNAMIC) == 0)
- + {
- + size_t sym_count;
- +
- + if (elf_bad_symtab (sec->owner))
- + sym_count = (elf_tdata (sec->owner)->symtab_hdr.sh_size
- + / sizeof (Elf_External_Sym));
- + else
- + sym_count = elf_tdata (sec->owner)->symtab_hdr.sh_info;
- +
- + if (sym_count > max_sym_count)
- + max_sym_count = sym_count;
- +
- + if (sym_count > max_sym_shndx_count
- + && elf_symtab_shndx (sec->owner) != 0)
- + max_sym_shndx_count = sym_count;
- +
- + if ((sec->flags & SEC_RELOC) != 0)
- + {
- + size_t ext_size;
- +
- + ext_size = elf_section_data (sec)->rel_hdr.sh_size;
- + if (ext_size > max_external_reloc_size)
- + max_external_reloc_size = ext_size;
- + if (sec->reloc_count > max_internal_reloc_count)
- + max_internal_reloc_count = sec->reloc_count;
- + }
- + }
- + }
- + }
- +
- + if (!strcmp(bfd_section_name(abfd, o), ".sdata"))
- + sdata_sec = o;
- + else if(!strcmp(bfd_section_name(abfd, o), ".sbss"))
- + sbss_sec = o;
- + else
- + bfd_set_section_vma(abfd, o, 0);
- +
- + if (o->reloc_count > 0)
- + {
- + o->flags |= SEC_RELOC;
- + if (o == sdata_sec || o == sbss_sec)
- + max_datadata_reloc_count += o->reloc_count;
- + }
- + else
- + {
- + /* Explicitly clear the SEC_RELOC flag. The linker tends to
- + set it (this is probably a bug) and if it is set
- + assign_section_numbers will create a reloc section. */
- + o->flags &=~ SEC_RELOC;
- + }
- +
- + /* If the SEC_ALLOC flag is not set, force the section VMA to
- + zero. This is done in elf_fake_sections as well, but forcing
- + the VMA to 0 here will ensure that relocs against these
- + sections are handled correctly. */
- + if ((o->flags & SEC_ALLOC) == 0
- + && ! o->user_set_vma)
- + o->vma = 0;
- + }
- +
- + if (sdata_sec)
- + {
- + if (sbss_sec)
- + bfd_set_section_vma(abfd, sbss_sec, sbss_sec->vma - sdata_sec->vma);
- + bfd_set_section_vma(abfd, sdata_sec, 0);
- + }
- +
- + if (! info->relocateable && merged)
- + elf_link_hash_traverse (elf_hash_table (info),
- + elf_link_sec_merge_syms, (PTR) abfd);
- +
- + /* Figure out the file positions for everything but the symbol table
- + and the relocs. We set symcount to force assign_section_numbers
- + to create a symbol table. */
- + bfd_get_symcount (abfd) = 1;
- + BFD_ASSERT (! abfd->output_has_begun);
- + if (! _bfd_elf_compute_section_file_positions (abfd, info))
- + goto error_return;
- +
- + /* Figure out how many relocations we will have in each section.
- + Just using RELOC_COUNT isn't good enough since that doesn't
- + maintain a separate value for REL vs. RELA relocations. */
- + if (emit_relocs)
- + for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
- + for (o = sub->sections; o != NULL; o = o->next)
- + {
- + asection *output_section;
- +
- + if (! o->linker_mark)
- + {
- + /* This section was omitted from the link. */
- + continue;
- + }
- +
- + output_section = o->output_section;
- +
- + if (output_section != NULL
- + && (o->flags & SEC_RELOC) != 0)
- + {
- + struct bfd_elf_section_data *esdi
- + = elf_section_data (o);
- + struct bfd_elf_section_data *esdo
- + = elf_section_data (output_section);
- + unsigned int *rel_count;
- + unsigned int *rel_count2;
- + bfd_size_type entsize;
- + bfd_size_type entsize2;
- +
- + /* We must be careful to add the relocations from the
- + input section to the right output count. */
- + entsize = esdi->rel_hdr.sh_entsize;
- + entsize2 = esdi->rel_hdr2 ? esdi->rel_hdr2->sh_entsize : 0;
- + BFD_ASSERT ((entsize == sizeof (Elf_External_Rel)
- + || entsize == sizeof (Elf_External_Rela))
- + && entsize2 != entsize
- + && (entsize2 == 0
- + || entsize2 == sizeof (Elf_External_Rel)
- + || entsize2 == sizeof (Elf_External_Rela)));
- + if (entsize == esdo->rel_hdr.sh_entsize)
- + {
- + rel_count = &esdo->rel_count;
- + rel_count2 = &esdo->rel_count2;
- + }
- + else
- + {
- + rel_count = &esdo->rel_count2;
- + rel_count2 = &esdo->rel_count;
- + }
- +
- + *rel_count += NUM_SHDR_ENTRIES (& esdi->rel_hdr);
- + if (esdi->rel_hdr2)
- + *rel_count2 += NUM_SHDR_ENTRIES (esdi->rel_hdr2);
- + output_section->flags |= SEC_RELOC;
- + }
- + }
- +
- + /* That created the reloc sections. Set their sizes, and assign
- + them file positions, and allocate some buffers. */
- + for (o = abfd->sections; o != NULL; o = o->next)
- + {
- + if ((o->flags & SEC_RELOC) != 0)
- + {
- + if (!elf_link_size_reloc_section (abfd,
- + &elf_section_data (o)->rel_hdr,
- + o))
- + goto error_return;
- +
- + if (elf_section_data (o)->rel_hdr2
- + && !elf_link_size_reloc_section (abfd,
- + elf_section_data (o)->rel_hdr2,
- + o))
- + goto error_return;
- + }
- +
- + /* Now, reset REL_COUNT and REL_COUNT2 so that we can use them
- + to count upwards while actually outputting the relocations. */
- + elf_section_data (o)->rel_count = 0;
- + elf_section_data (o)->rel_count2 = 0;
- + }
- +
- + /* We have now assigned file positions for all the sections except
- + relocations, .symtab, and .strtab. We start the .symtab section
- + at the current file position, and write directly to it. We build
- + the .strtab section in memory. */
- + bfd_get_symcount (abfd) = 0;
- + symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- + /* sh_name is set in prep_headers. */
- + symtab_hdr->sh_type = SHT_SYMTAB;
- + symtab_hdr->sh_flags = 0;
- + symtab_hdr->sh_addr = 0;
- + symtab_hdr->sh_size = 0;
- + symtab_hdr->sh_entsize = sizeof (Elf_External_Sym);
- + /* sh_link is set in assign_section_numbers. */
- + /* sh_info is set below. */
- + /* sh_offset is set just below. */
- + symtab_hdr->sh_addralign = bed->s->file_align;
- +
- + off = elf_tdata (abfd)->next_file_pos;
- + off = _bfd_elf_assign_file_position_for_section (symtab_hdr, off, true);
- +
- + /* Note that at this point elf_tdata (abfd)->next_file_pos is
- + incorrect. We do not yet know the size of the .symtab section.
- + We correct next_file_pos below, after we do know the size. */
- +
- + /* Allocate a buffer to hold swapped out symbols. This is to avoid
- + continuously seeking to the right position in the file. */
- + if (! info->keep_memory || max_sym_count < 20)
- + finfo.symbuf_size = 20;
- + else
- + finfo.symbuf_size = max_sym_count;
- + amt = finfo.symbuf_size;
- + amt *= sizeof (Elf_External_Sym);
- + finfo.symbuf = (Elf_External_Sym *) bfd_malloc (amt);
- + if (finfo.symbuf == NULL)
- + goto error_return;
- + if (elf_numsections (abfd) > SHN_LORESERVE)
- + {
- + amt = finfo.symbuf_size;
- + amt *= sizeof (Elf_External_Sym_Shndx);
- + finfo.symshndxbuf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
- + if (finfo.symshndxbuf == NULL)
- + goto error_return;
- + }
- +
- + /* Start writing out the symbol table. The first symbol is always a
- + dummy symbol. */
- + elfsym.st_value = 0;
- + elfsym.st_size = 0;
- + elfsym.st_info = 0;
- + elfsym.st_other = 0;
- + elfsym.st_shndx = SHN_UNDEF;
- + if (! elf_link_output_sym (&finfo, (const char *) NULL,
- + &elfsym, bfd_und_section_ptr))
- + goto error_return;
- +
- +#if 0
- + /* Some standard ELF linkers do this, but we don't because it causes
- + bootstrap comparison failures. */
- + /* Output a file symbol for the output file as the second symbol.
- + We output this even if we are discarding local symbols, although
- + I'm not sure if this is correct. */
- + elfsym.st_value = 0;
- + elfsym.st_size = 0;
- + elfsym.st_info = ELF_ST_INFO (STB_LOCAL, STT_FILE);
- + elfsym.st_other = 0;
- + elfsym.st_shndx = SHN_ABS;
- + if (! elf_link_output_sym (&finfo, bfd_get_filename (abfd),
- + &elfsym, bfd_abs_section_ptr))
- + goto error_return;
- +#endif
- +
- + /* Output a symbol for each section. We output these even if we are
- + discarding local symbols, since they are used for relocs. These
- + symbols have no names. We store the index of each one in the
- + index field of the section, so that we can find it again when
- + outputting relocs. */
- + elfsym.st_size = 0;
- + elfsym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION);
- + elfsym.st_other = 0;
- + for (i = 1; i < elf_numsections (abfd); i++)
- + {
- + o = section_from_elf_index (abfd, i);
- + if (o != NULL)
- + o->target_index = bfd_get_symcount (abfd);
- + elfsym.st_shndx = i;
- + elfsym.st_value = 0;
- + if (! elf_link_output_sym (&finfo, (const char *) NULL,
- + &elfsym, o))
- + goto error_return;
- + if (i == SHN_LORESERVE)
- + i += SHN_HIRESERVE + 1 - SHN_LORESERVE;
- + }
- +
- + /* Allocate some memory to hold information read in from the input
- + files. */
- + if (max_contents_size != 0)
- + {
- + finfo.contents = (bfd_byte *) bfd_malloc (max_contents_size);
- + if (finfo.contents == NULL)
- + goto error_return;
- + }
- +
- + if (max_external_reloc_size != 0)
- + {
- + finfo.external_relocs = (PTR) bfd_malloc (max_external_reloc_size);
- + if (finfo.external_relocs == NULL)
- + goto error_return;
- + }
- +
- + if (max_internal_reloc_count != 0)
- + {
- + amt = max_internal_reloc_count * bed->s->int_rels_per_ext_rel;
- + amt *= sizeof (Elf_Internal_Rela);
- + finfo.internal_relocs = (Elf_Internal_Rela *) bfd_malloc (amt);
- + if (finfo.internal_relocs == NULL)
- + goto error_return;
- + }
- +
- + if (max_sym_count != 0)
- + {
- + amt = max_sym_count * sizeof (Elf_External_Sym);
- + finfo.external_syms = (Elf_External_Sym *) bfd_malloc (amt);
- + if (finfo.external_syms == NULL)
- + goto error_return;
- +
- + amt = max_sym_count * sizeof (Elf_Internal_Sym);
- + finfo.internal_syms = (Elf_Internal_Sym *) bfd_malloc (amt);
- + if (finfo.internal_syms == NULL)
- + goto error_return;
- +
- + amt = max_sym_count * sizeof (long);
- + finfo.indices = (long *) bfd_malloc (amt);
- + if (finfo.indices == NULL)
- + goto error_return;
- +
- + amt = max_sym_count * sizeof (asection *);
- + finfo.sections = (asection **) bfd_malloc (amt);
- + if (finfo.sections == NULL)
- + goto error_return;
- + }
- +
- + if (max_sym_shndx_count != 0)
- + {
- + amt = max_sym_shndx_count * sizeof (Elf_External_Sym_Shndx);
- + finfo.locsym_shndx = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
- + if (finfo.locsym_shndx == NULL)
- + goto error_return;
- + }
- +
- + if (finfo.first_tls_sec)
- + {
- + unsigned int align = 0;
- + bfd_vma base = finfo.first_tls_sec->vma, end = 0;
- + asection *sec;
- +
- + for (sec = finfo.first_tls_sec;
- + sec && (sec->flags & SEC_THREAD_LOCAL);
- + sec = sec->next)
- + {
- + bfd_vma size = sec->_raw_size;
- +
- + if (bfd_get_section_alignment (abfd, sec) > align)
- + align = bfd_get_section_alignment (abfd, sec);
- + if (sec->_raw_size == 0 && (sec->flags & SEC_HAS_CONTENTS) == 0)
- + {
- + struct bfd_link_order *o;
- +
- + size = 0;
- + for (o = sec->link_order_head; o != NULL; o = o->next)
- + if (size < o->offset + o->size)
- + size = o->offset + o->size;
- + }
- + end = sec->vma + size;
- + }
- + elf_hash_table (info)->tls_segment
- + = bfd_zalloc (abfd, sizeof (struct elf_link_tls_segment));
- + if (elf_hash_table (info)->tls_segment == NULL)
- + goto error_return;
- + elf_hash_table (info)->tls_segment->start = base;
- + elf_hash_table (info)->tls_segment->size = end - base;
- + elf_hash_table (info)->tls_segment->align = align;
- + }
- +
- + if (ddr_sec)
- + {
- + ddr_count = 0;
- + ddr_ptr = (unsigned *)bfd_alloc(abfd, 4 * max_datadata_reloc_count + 4);
- + if (ddr_ptr)
- + ++ddr_ptr;
- + else
- + goto error_return;
- + }
- + else
- + ddr_ptr = NULL;
- +
- + /* Since ELF permits relocations to be against local symbols, we
- + must have the local symbols available when we do the relocations.
- + Since we would rather only read the local symbols once, and we
- + would rather not keep them in memory, we handle all the
- + relocations for a single input file at the same time.
- +
- + Unfortunately, there is no way to know the total number of local
- + symbols until we have seen all of them, and the local symbol
- + indices precede the global symbol indices. This means that when
- + we are generating relocateable output, and we see a reloc against
- + a global symbol, we can not know the symbol index until we have
- + finished examining all the local symbols to see which ones we are
- + going to output. To deal with this, we keep the relocations in
- + memory, and don't output them until the end of the link. This is
- + an unfortunate waste of memory, but I don't see a good way around
- + it. Fortunately, it only happens when performing a relocateable
- + link, which is not the common case. FIXME: If keep_memory is set
- + we could write the relocs out and then read them again; I don't
- + know how bad the memory loss will be. */
- +
- + for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
- + sub->output_has_begun = false;
- + for (o = abfd->sections; o != NULL; o = o->next)
- + {
- + for (p = o->link_order_head; p != NULL; p = p->next)
- + {
- + if (p->type == bfd_indirect_link_order
- + && (bfd_get_flavour ((sub = p->u.indirect.section->owner))
- + == bfd_target_elf_flavour)
- + && elf_elfheader (sub)->e_ident[EI_CLASS] == bed->s->elfclass)
- + {
- + if (! sub->output_has_begun)
- + {
- + if (! elf_link_input_bfd (&finfo, sub))
- + goto error_return;
- + sub->output_has_begun = true;
- + }
- + }
- + else if (p->type == bfd_section_reloc_link_order
- + || p->type == bfd_symbol_reloc_link_order)
- + {
- + if (! elf_reloc_link_order (abfd, info, o, p))
- + goto error_return;
- + }
- + else
- + {
- + if (! _bfd_default_link_order (abfd, info, o, p))
- + goto error_return;
- + }
- + }
- + }
- +
- + /* Output any global symbols that got converted to local in a
- + version script or due to symbol visibility. We do this in a
- + separate step since ELF requires all local symbols to appear
- + prior to any global symbols. FIXME: We should only do this if
- + some global symbols were, in fact, converted to become local.
- + FIXME: Will this work correctly with the Irix 5 linker? */
- + eoinfo.failed = false;
- + eoinfo.finfo = &finfo;
- + eoinfo.localsyms = true;
- + elf_link_hash_traverse (elf_hash_table (info), elf_link_output_extsym,
- + (PTR) &eoinfo);
- + if (eoinfo.failed)
- + return false;
- +
- + /* Set the vma of the sections to 0. We can't do that before, otherwise the
- + relocation doesn't work properly for .sbss. */
- + {
- + int n = elf_elfheader(abfd)->e_shnum;
- + Elf_Internal_Shdr **hdr = elf_elfsections(abfd);
- + for (i = 1; i < n; ++i, ++hdr)
- + (*hdr)->sh_addr = 0;
- + }
- +
- + /* That wrote out all the local symbols. Finish up the symbol table
- + with the global symbols. Even if we want to strip everything we
- + can, we still need to deal with those global symbols that got
- + converted to local in a version script. */
- +
- + /* The sh_info field records the index of the first non local symbol. */
- + symtab_hdr->sh_info = bfd_get_symcount (abfd);
- +
- + if (dynamic
- + && finfo.dynsym_sec->output_section != bfd_abs_section_ptr)
- + {
- + Elf_Internal_Sym sym;
- + Elf_External_Sym *dynsym =
- + (Elf_External_Sym *) finfo.dynsym_sec->contents;
- + long last_local = 0;
- +
- + /* Write out the section symbols for the output sections. */
- + if (info->shared)
- + {
- + asection *s;
- +
- + sym.st_size = 0;
- + sym.st_name = 0;
- + sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION);
- + sym.st_other = 0;
- +
- + for (s = abfd->sections; s != NULL; s = s->next)
- + {
- + int indx;
- + Elf_External_Sym *dest;
- +
- + indx = elf_section_data (s)->this_idx;
- + BFD_ASSERT (indx > 0);
- + sym.st_shndx = indx;
- + sym.st_value = s->vma;
- + dest = dynsym + elf_section_data (s)->dynindx;
- + elf_swap_symbol_out (abfd, &sym, (PTR) dest, (PTR) 0);
- + }
- +
- + last_local = bfd_count_sections (abfd);
- + }
- +
- + /* Write out the local dynsyms. */
- + if (elf_hash_table (info)->dynlocal)
- + {
- + struct elf_link_local_dynamic_entry *e;
- + for (e = elf_hash_table (info)->dynlocal; e ; e = e->next)
- + {
- + asection *s;
- + Elf_External_Sym *dest;
- +
- + sym.st_size = e->isym.st_size;
- + sym.st_other = e->isym.st_other;
- +
- + /* Copy the internal symbol as is.
- + Note that we saved a word of storage and overwrote
- + the original st_name with the dynstr_index. */
- + sym = e->isym;
- +
- + if (e->isym.st_shndx != SHN_UNDEF
- + && (e->isym.st_shndx < SHN_LORESERVE
- + || e->isym.st_shndx > SHN_HIRESERVE))
- + {
- + s = bfd_section_from_elf_index (e->input_bfd,
- + e->isym.st_shndx);
- +
- + sym.st_shndx =
- + elf_section_data (s->output_section)->this_idx;
- + sym.st_value = (s->output_section->vma
- + + s->output_offset
- + + e->isym.st_value);
- + }
- +
- + if (last_local < e->dynindx)
- + last_local = e->dynindx;
- +
- + dest = dynsym + e->dynindx;
- + elf_swap_symbol_out (abfd, &sym, (PTR) dest, (PTR) 0);
- + }
- + }
- +
- + elf_section_data (finfo.dynsym_sec->output_section)->this_hdr.sh_info =
- + last_local + 1;
- + }
- +
- + /* We get the global symbols from the hash table. */
- + eoinfo.failed = false;
- + eoinfo.localsyms = false;
- + eoinfo.finfo = &finfo;
- + elf_link_hash_traverse (elf_hash_table (info), elf_link_output_extsym,
- + (PTR) &eoinfo);
- + if (eoinfo.failed)
- + return false;
- +
- + /* If backend needs to output some symbols not present in the hash
- + table, do it now. */
- + if (bed->elf_backend_output_arch_syms)
- + {
- + typedef boolean (*out_sym_func) PARAMS ((PTR, const char *,
- + Elf_Internal_Sym *,
- + asection *));
- +
- + if (! ((*bed->elf_backend_output_arch_syms)
- + (abfd, info, (PTR) &finfo, (out_sym_func) elf_link_output_sym)))
- + return false;
- + }
- +
- + /* Flush all symbols to the file. */
- + if (! elf_link_flush_output_syms (&finfo))
- + return false;
- +
- + /* Now we know the size of the symtab section. */
- + off += symtab_hdr->sh_size;
- +
- + /* Add the __datadata_relocs table. */
- + if (ddr_sec)
- + {
- + Elf_Internal_Shdr *hdr = elf_elfsections(abfd)[_bfd_elf_section_from_bfd_section(abfd, ddr_sec)];
- + ddr_sec->_cooked_size = ddr_sec->_raw_size = hdr->sh_size = 4 * ddr_count + 4;
- + hdr->sh_addralign = 2;
- + off = _bfd_elf_assign_file_position_for_section (hdr, off, true);
- + ddr_ptr -= ddr_count + 1;
- + *ddr_ptr = ddr_count ? ddr_count : -1;
- + bfd_set_section_contents(abfd, ddr_sec, ddr_ptr, 0, hdr->sh_size);
- + }
- +
- + /* Finish up and write out the symbol string table (.strtab)
- + section. */
- + symstrtab_hdr = &elf_tdata (abfd)->strtab_hdr;
- + /* sh_name was set in prep_headers. */
- + symstrtab_hdr->sh_type = SHT_STRTAB;
- + symstrtab_hdr->sh_flags = 0;
- + symstrtab_hdr->sh_addr = 0;
- + symstrtab_hdr->sh_size = _bfd_stringtab_size (finfo.symstrtab);
- + symstrtab_hdr->sh_entsize = 0;
- + symstrtab_hdr->sh_link = 0;
- + symstrtab_hdr->sh_info = 0;
- + /* sh_offset is set just below. */
- + symstrtab_hdr->sh_addralign = 1;
- +
- + off = _bfd_elf_assign_file_position_for_section (symstrtab_hdr, off, true);
- + elf_tdata (abfd)->next_file_pos = off;
- +
- + if (bfd_get_symcount (abfd) > 0)
- + {
- + if (bfd_seek (abfd, symstrtab_hdr->sh_offset, SEEK_SET) != 0
- + || ! _bfd_stringtab_emit (abfd, finfo.symstrtab))
- + return false;
- + }
- +
- + /* Adjust the relocs to have the correct symbol indices. */
- + for (o = abfd->sections; o != NULL; o = o->next)
- + {
- + if ((o->flags & SEC_RELOC) == 0)
- + continue;
- +
- + elf_link_adjust_relocs (abfd, &elf_section_data (o)->rel_hdr,
- + elf_section_data (o)->rel_count,
- + elf_section_data (o)->rel_hashes);
- + if (elf_section_data (o)->rel_hdr2 != NULL)
- + elf_link_adjust_relocs (abfd, elf_section_data (o)->rel_hdr2,
- + elf_section_data (o)->rel_count2,
- + (elf_section_data (o)->rel_hashes
- + + elf_section_data (o)->rel_count));
- +
- + elf_section_data (o)->rel_hdr.sh_size =
- + o->reloc_count * elf_section_data (o)->rel_hdr.sh_entsize;
- +
- + /* Set the reloc_count field to 0 to prevent write_relocs from
- + trying to swap the relocs out itself. */
- + o->reloc_count = 0;
- + }
- +
- + _bfd_elf_assign_file_positions_for_relocs (abfd);
- +
- + if (dynamic && info->combreloc && dynobj != NULL)
- + relativecount = elf_link_sort_relocs (abfd, info, &reldyn);
- +
- + /* If we are linking against a dynamic object, or generating a
- + shared library, finish up the dynamic linking information. */
- + if (dynamic)
- + {
- + Elf_External_Dyn *dyncon, *dynconend;
- +
- + /* Fix up .dynamic entries. */
- + o = bfd_get_section_by_name (dynobj, ".dynamic");
- + BFD_ASSERT (o != NULL);
- +
- + dyncon = (Elf_External_Dyn *) o->contents;
- + dynconend = (Elf_External_Dyn *) (o->contents + o->_raw_size);
- + for (; dyncon < dynconend; dyncon++)
- + {
- + Elf_Internal_Dyn dyn;
- + const char *name;
- + unsigned int type;
- +
- + elf_swap_dyn_in (dynobj, dyncon, &dyn);
- +
- + switch (dyn.d_tag)
- + {
- + default:
- + break;
- + case DT_NULL:
- + if (relativecount > 0 && dyncon + 1 < dynconend)
- + {
- + switch (elf_section_data (reldyn)->this_hdr.sh_type)
- + {
- + case SHT_REL: dyn.d_tag = DT_RELCOUNT; break;
- + case SHT_RELA: dyn.d_tag = DT_RELACOUNT; break;
- + default: break;
- + }
- + if (dyn.d_tag != DT_NULL)
- + {
- + dyn.d_un.d_val = relativecount;
- + elf_swap_dyn_out (dynobj, &dyn, dyncon);
- + relativecount = 0;
- + }
- + }
- + break;
- + case DT_INIT:
- + name = info->init_function;
- + goto get_sym;
- + case DT_FINI:
- + name = info->fini_function;
- + get_sym:
- + {
- + struct elf_link_hash_entry *h;
- +
- + h = elf_link_hash_lookup (elf_hash_table (info), name,
- + false, false, true);
- + if (h != NULL
- + && (h->root.type == bfd_link_hash_defined
- + || h->root.type == bfd_link_hash_defweak))
- + {
- + dyn.d_un.d_val = h->root.u.def.value;
- + o = h->root.u.def.section;
- + if (o->output_section != NULL)
- + dyn.d_un.d_val += (o->output_section->vma
- + + o->output_offset);
- + else
- + {
- + /* The symbol is imported from another shared
- + library and does not apply to this one. */
- + dyn.d_un.d_val = 0;
- + }
- +
- + elf_swap_dyn_out (dynobj, &dyn, dyncon);
- + }
- + }
- + break;
- +
- + case DT_PREINIT_ARRAYSZ:
- + name = ".preinit_array";
- + goto get_size;
- + case DT_INIT_ARRAYSZ:
- + name = ".init_array";
- + goto get_size;
- + case DT_FINI_ARRAYSZ:
- + name = ".fini_array";
- + get_size:
- + o = bfd_get_section_by_name (abfd, name);
- + if (o == NULL)
- + {
- + (*_bfd_error_handler)
- + (_("%s: could not find output section %s"),
- + bfd_get_filename (abfd), name);
- + goto error_return;
- + }
- + if (o->_raw_size == 0)
- + (*_bfd_error_handler)
- + (_("warning: %s section has zero size"), name);
- + dyn.d_un.d_val = o->_raw_size;
- + elf_swap_dyn_out (dynobj, &dyn, dyncon);
- + break;
- +
- + case DT_PREINIT_ARRAY:
- + name = ".preinit_array";
- + goto get_vma;
- + case DT_INIT_ARRAY:
- + name = ".init_array";
- + goto get_vma;
- + case DT_FINI_ARRAY:
- + name = ".fini_array";
- + goto get_vma;
- +
- + case DT_HASH:
- + name = ".hash";
- + goto get_vma;
- + case DT_STRTAB:
- + name = ".dynstr";
- + goto get_vma;
- + case DT_SYMTAB:
- + name = ".dynsym";
- + goto get_vma;
- + case DT_VERDEF:
- + name = ".gnu.version_d";
- + goto get_vma;
- + case DT_VERNEED:
- + name = ".gnu.version_r";
- + goto get_vma;
- + case DT_VERSYM:
- + name = ".gnu.version";
- + get_vma:
- + o = bfd_get_section_by_name (abfd, name);
- + if (o == NULL)
- + {
- + (*_bfd_error_handler)
- + (_("%s: could not find output section %s"),
- + bfd_get_filename (abfd), name);
- + goto error_return;
- + }
- + dyn.d_un.d_ptr = o->vma;
- + elf_swap_dyn_out (dynobj, &dyn, dyncon);
- + break;
- +
- + case DT_REL:
- + case DT_RELA:
- + case DT_RELSZ:
- + case DT_RELASZ:
- + if (dyn.d_tag == DT_REL || dyn.d_tag == DT_RELSZ)
- + type = SHT_REL;
- + else
- + type = SHT_RELA;
- + dyn.d_un.d_val = 0;
- + for (i = 1; i < elf_numsections (abfd); i++)
- + {
- + Elf_Internal_Shdr *hdr;
- +
- + hdr = elf_elfsections (abfd)[i];
- + if (hdr->sh_type == type
- + && (hdr->sh_flags & SHF_ALLOC) != 0)
- + {
- + if (dyn.d_tag == DT_RELSZ || dyn.d_tag == DT_RELASZ)
- + dyn.d_un.d_val += hdr->sh_size;
- + else
- + {
- + if (dyn.d_un.d_val == 0
- + || hdr->sh_addr < dyn.d_un.d_val)
- + dyn.d_un.d_val = hdr->sh_addr;
- + }
- + }
- + }
- + elf_swap_dyn_out (dynobj, &dyn, dyncon);
- + break;
- + }
- + }
- + }
- +
- + /* If we have created any dynamic sections, then output them. */
- + if (dynobj != NULL)
- + {
- + if (! (*bed->elf_backend_finish_dynamic_sections) (abfd, info))
- + goto error_return;
- +
- + for (o = dynobj->sections; o != NULL; o = o->next)
- + {
- + if ((o->flags & SEC_HAS_CONTENTS) == 0
- + || o->_raw_size == 0
- + || o->output_section == bfd_abs_section_ptr)
- + continue;
- + if ((o->flags & SEC_LINKER_CREATED) == 0)
- + {
- + /* At this point, we are only interested in sections
- + created by elf_link_create_dynamic_sections. */
- + continue;
- + }
- + if ((elf_section_data (o->output_section)->this_hdr.sh_type
- + != SHT_STRTAB)
- + || strcmp (bfd_get_section_name (abfd, o), ".dynstr") != 0)
- + {
- + if (! bfd_set_section_contents (abfd, o->output_section,
- + o->contents,
- + (file_ptr) o->output_offset,
- + o->_raw_size))
- + goto error_return;
- + }
- + else
- + {
- + /* The contents of the .dynstr section are actually in a
- + stringtab. */
- + off = elf_section_data (o->output_section)->this_hdr.sh_offset;
- + if (bfd_seek (abfd, off, SEEK_SET) != 0
- + || ! _bfd_elf_strtab_emit (abfd,
- + elf_hash_table (info)->dynstr))
- + goto error_return;
- + }
- + }
- + }
- +
- + if (info->relocateable)
- + {
- + boolean failed = false;
- +
- + bfd_map_over_sections (abfd, bfd_elf_set_group_contents, &failed);
- + if (failed)
- + goto error_return;
- + }
- +
- + /* If we have optimized stabs strings, output them. */
- + if (elf_hash_table (info)->stab_info != NULL)
- + {
- + if (! _bfd_write_stab_strings (abfd, &elf_hash_table (info)->stab_info))
- + goto error_return;
- + }
- +
- + if (info->eh_frame_hdr && elf_hash_table (info)->dynobj)
- + {
- + o = bfd_get_section_by_name (elf_hash_table (info)->dynobj,
- + ".eh_frame_hdr");
- + if (o
- + && (elf_section_data (o)->sec_info_type
- + == ELF_INFO_TYPE_EH_FRAME_HDR))
- + {
- + if (! _bfd_elf_write_section_eh_frame_hdr (abfd, o))
- + goto error_return;
- + }
- + }
- +
- + if (finfo.symstrtab != NULL)
- + _bfd_stringtab_free (finfo.symstrtab);
- + if (finfo.contents != NULL)
- + free (finfo.contents);
- + if (finfo.external_relocs != NULL)
- + free (finfo.external_relocs);
- + if (finfo.internal_relocs != NULL)
- + free (finfo.internal_relocs);
- + if (finfo.external_syms != NULL)
- + free (finfo.external_syms);
- + if (finfo.locsym_shndx != NULL)
- + free (finfo.locsym_shndx);
- + if (finfo.internal_syms != NULL)
- + free (finfo.internal_syms);
- + if (finfo.indices != NULL)
- + free (finfo.indices);
- + if (finfo.sections != NULL)
- + free (finfo.sections);
- + if (finfo.symbuf != NULL)
- + free (finfo.symbuf);
- + if (finfo.symshndxbuf != NULL)
- + free (finfo.symbuf);
- + for (o = abfd->sections; o != NULL; o = o->next)
- + {
- + if ((o->flags & SEC_RELOC) != 0
- + && elf_section_data (o)->rel_hashes != NULL)
- + free (elf_section_data (o)->rel_hashes);
- + }
- +
- + elf_tdata (abfd)->linker = true;
- +
- + return true;
- +
- + error_return:
- + if (finfo.symstrtab != NULL)
- + _bfd_stringtab_free (finfo.symstrtab);
- + if (finfo.contents != NULL)
- + free (finfo.contents);
- + if (finfo.external_relocs != NULL)
- + free (finfo.external_relocs);
- + if (finfo.internal_relocs != NULL)
- + free (finfo.internal_relocs);
- + if (finfo.external_syms != NULL)
- + free (finfo.external_syms);
- + if (finfo.locsym_shndx != NULL)
- + free (finfo.locsym_shndx);
- + if (finfo.internal_syms != NULL)
- + free (finfo.internal_syms);
- + if (finfo.indices != NULL)
- + free (finfo.indices);
- + if (finfo.sections != NULL)
- + free (finfo.sections);
- + if (finfo.symbuf != NULL)
- + free (finfo.symbuf);
- + if (finfo.symshndxbuf != NULL)
- + free (finfo.symbuf);
- + for (o = abfd->sections; o != NULL; o = o->next)
- + {
- + if ((o->flags & SEC_RELOC) != 0
- + && elf_section_data (o)->rel_hashes != NULL)
- + free (elf_section_data (o)->rel_hashes);
- + }
- +
- + return false;
- +}
- +
- +/* Add a symbol to the output symbol table. */
- +
- +static boolean
- +elf_link_output_sym (finfo, name, elfsym, input_sec)
- + struct elf_final_link_info *finfo;
- + const char *name;
- + Elf_Internal_Sym *elfsym;
- + asection *input_sec;
- +{
- + Elf_External_Sym *dest;
- + Elf_External_Sym_Shndx *destshndx;
- +
- + boolean (*output_symbol_hook) PARAMS ((bfd *,
- + struct bfd_link_info *info,
- + const char *,
- + Elf_Internal_Sym *,
- + asection *));
- +
- + output_symbol_hook = get_elf_backend_data (finfo->output_bfd)->
- + elf_backend_link_output_symbol_hook;
- + if (output_symbol_hook != NULL)
- + {
- + if (! ((*output_symbol_hook)
- + (finfo->output_bfd, finfo->info, name, elfsym, input_sec)))
- + return false;
- + }
- +
- + if (name == (const char *) NULL || *name == '\0')
- + elfsym->st_name = 0;
- + else if (input_sec->flags & SEC_EXCLUDE)
- + elfsym->st_name = 0;
- + else
- + {
- + elfsym->st_name = (unsigned long) _bfd_stringtab_add (finfo->symstrtab,
- + name, true, false);
- + if (elfsym->st_name == (unsigned long) -1)
- + return false;
- + }
- +
- + if (finfo->symbuf_count >= finfo->symbuf_size)
- + {
- + if (! elf_link_flush_output_syms (finfo))
- + return false;
- + }
- +
- + dest = finfo->symbuf + finfo->symbuf_count;
- + destshndx = finfo->symshndxbuf;
- + if (destshndx != NULL)
- + destshndx += finfo->symbuf_count;
- + elf_swap_symbol_out (finfo->output_bfd, elfsym, (PTR) dest, (PTR) destshndx);
- + ++finfo->symbuf_count;
- +
- + ++ bfd_get_symcount (finfo->output_bfd);
- +
- + return true;
- +}
- +
- +/* Flush the output symbols to the file. */
- +
- +static boolean
- +elf_link_flush_output_syms (finfo)
- + struct elf_final_link_info *finfo;
- +{
- + if (finfo->symbuf_count > 0)
- + {
- + Elf_Internal_Shdr *hdr;
- + file_ptr pos;
- + bfd_size_type amt;
- +
- + hdr = &elf_tdata (finfo->output_bfd)->symtab_hdr;
- + pos = hdr->sh_offset + hdr->sh_size;
- + amt = finfo->symbuf_count * sizeof (Elf_External_Sym);
- + if (bfd_seek (finfo->output_bfd, pos, SEEK_SET) != 0
- + || bfd_bwrite ((PTR) finfo->symbuf, amt, finfo->output_bfd) != amt)
- + return false;
- +
- + hdr->sh_size += amt;
- +
- + if (finfo->symshndxbuf != NULL)
- + {
- + hdr = &elf_tdata (finfo->output_bfd)->symtab_shndx_hdr;
- + pos = hdr->sh_offset + hdr->sh_size;
- + amt = finfo->symbuf_count * sizeof (Elf_External_Sym_Shndx);
- + if (bfd_seek (finfo->output_bfd, pos, SEEK_SET) != 0
- + || (bfd_bwrite ((PTR) finfo->symshndxbuf, amt, finfo->output_bfd)
- + != amt))
- + return false;
- +
- + hdr->sh_size += amt;
- + }
- +
- + finfo->symbuf_count = 0;
- + }
- +
- + return true;
- +}
- +
- +/* Adjust all external symbols pointing into SEC_MERGE sections
- + to reflect the object merging within the sections. */
- +
- +static boolean
- +elf_link_sec_merge_syms (h, data)
- + struct elf_link_hash_entry *h;
- + PTR data;
- +{
- + asection *sec;
- +
- + if (h->root.type == bfd_link_hash_warning)
- + h = (struct elf_link_hash_entry *) h->root.u.i.link;
- +
- + if ((h->root.type == bfd_link_hash_defined
- + || h->root.type == bfd_link_hash_defweak)
- + && ((sec = h->root.u.def.section)->flags & SEC_MERGE)
- + && elf_section_data (sec)->sec_info_type == ELF_INFO_TYPE_MERGE)
- + {
- + bfd *output_bfd = (bfd *) data;
- +
- + h->root.u.def.value =
- + _bfd_merged_section_offset (output_bfd,
- + &h->root.u.def.section,
- + elf_section_data (sec)->sec_info,
- + h->root.u.def.value, (bfd_vma) 0);
- + }
- +
- + return true;
- +}
- +
- +/* For DSOs loaded in via a DT_NEEDED entry, emulate ld.so in
- + allowing an unsatisfied unversioned symbol in the DSO to match a
- + versioned symbol that would normally require an explicit version. */
- +
- +static boolean
- +elf_link_check_versioned_symbol (info, h)
- + struct bfd_link_info *info;
- + struct elf_link_hash_entry *h;
- +{
- + bfd *undef_bfd = h->root.u.undef.abfd;
- + struct elf_link_loaded_list *loaded;
- +
- + if ((undef_bfd->flags & DYNAMIC) == 0
- + || info->hash->creator->flavour != bfd_target_elf_flavour
- + || elf_dt_soname (h->root.u.undef.abfd) == NULL)
- + return false;
- +
- + for (loaded = elf_hash_table (info)->loaded;
- + loaded != NULL;
- + loaded = loaded->next)
- + {
- + bfd *input;
- + Elf_Internal_Shdr *hdr;
- + bfd_size_type symcount;
- + bfd_size_type extsymcount;
- + bfd_size_type extsymoff;
- + Elf_Internal_Shdr *versymhdr;
- + Elf_Internal_Sym *isym;
- + Elf_Internal_Sym *isymend;
- + Elf_Internal_Sym *isymbuf;
- + Elf_External_Versym *ever;
- + Elf_External_Versym *extversym;
- +
- + input = loaded->abfd;
- +
- + /* We check each DSO for a possible hidden versioned definition. */
- + if (input == undef_bfd
- + || (input->flags & DYNAMIC) == 0
- + || elf_dynversym (input) == 0)
- + continue;
- +
- + hdr = &elf_tdata (input)->dynsymtab_hdr;
- +
- + symcount = hdr->sh_size / sizeof (Elf_External_Sym);
- + if (elf_bad_symtab (input))
- + {
- + extsymcount = symcount;
- + extsymoff = 0;
- + }
- + else
- + {
- + extsymcount = symcount - hdr->sh_info;
- + extsymoff = hdr->sh_info;
- + }
- +
- + if (extsymcount == 0)
- + continue;
- +
- + isymbuf = bfd_elf_get_elf_syms (input, hdr, extsymcount, extsymoff,
- + NULL, NULL, NULL);
- + if (isymbuf == NULL)
- + return false;
- +
- + /* Read in any version definitions. */
- + versymhdr = &elf_tdata (input)->dynversym_hdr;
- + extversym = (Elf_External_Versym *) bfd_malloc (versymhdr->sh_size);
- + if (extversym == NULL)
- + goto error_ret;
- +
- + if (bfd_seek (input, versymhdr->sh_offset, SEEK_SET) != 0
- + || (bfd_bread ((PTR) extversym, versymhdr->sh_size, input)
- + != versymhdr->sh_size))
- + {
- + free (extversym);
- + error_ret:
- + free (isymbuf);
- + return false;
- + }
- +
- + ever = extversym + extsymoff;
- + isymend = isymbuf + extsymcount;
- + for (isym = isymbuf; isym < isymend; isym++, ever++)
- + {
- + const char *name;
- + Elf_Internal_Versym iver;
- +
- + if (ELF_ST_BIND (isym->st_info) == STB_LOCAL
- + || isym->st_shndx == SHN_UNDEF)
- + continue;
- +
- + name = bfd_elf_string_from_elf_section (input,
- + hdr->sh_link,
- + isym->st_name);
- + if (strcmp (name, h->root.root.string) != 0)
- + continue;
- +
- + _bfd_elf_swap_versym_in (input, ever, &iver);
- +
- + if ((iver.vs_vers & VERSYM_HIDDEN) == 0)
- + {
- + /* If we have a non-hidden versioned sym, then it should
- + have provided a definition for the undefined sym. */
- + abort ();
- + }
- +
- + if ((iver.vs_vers & VERSYM_VERSION) == 2)
- + {
- + /* This is the oldest (default) sym. We can use it. */
- + free (extversym);
- + free (isymbuf);
- + return true;
- + }
- + }
- +
- + free (extversym);
- + free (isymbuf);
- + }
- +
- + return false;
- +}
- +
- +/* Add an external symbol to the symbol table. This is called from
- + the hash table traversal routine. When generating a shared object,
- + we go through the symbol table twice. The first time we output
- + anything that might have been forced to local scope in a version
- + script. The second time we output the symbols that are still
- + global symbols. */
- +
- +static boolean
- +elf_link_output_extsym (h, data)
- + struct elf_link_hash_entry *h;
- + PTR data;
- +{
- + struct elf_outext_info *eoinfo = (struct elf_outext_info *) data;
- + struct elf_final_link_info *finfo = eoinfo->finfo;
- + boolean strip;
- + Elf_Internal_Sym sym;
- + asection *input_sec;
- +
- + if (h->root.type == bfd_link_hash_warning)
- + {
- + h = (struct elf_link_hash_entry *) h->root.u.i.link;
- + if (h->root.type == bfd_link_hash_new)
- + return true;
- + }
- +
- + /* Decide whether to output this symbol in this pass. */
- + if (eoinfo->localsyms)
- + {
- + if ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
- + return true;
- + }
- + else
- + {
- + if ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0)
- + return true;
- + }
- +
- + /* If we are not creating a shared library, and this symbol is
- + referenced by a shared library but is not defined anywhere, then
- + warn that it is undefined. If we do not do this, the runtime
- + linker will complain that the symbol is undefined when the
- + program is run. We don't have to worry about symbols that are
- + referenced by regular files, because we will already have issued
- + warnings for them. */
- + if (! finfo->info->relocateable
- + && ! finfo->info->allow_shlib_undefined
- + && ! finfo->info->shared
- + && h->root.type == bfd_link_hash_undefined
- + && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0
- + && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0
- + && ! elf_link_check_versioned_symbol (finfo->info, h))
- + {
- + if (! ((*finfo->info->callbacks->undefined_symbol)
- + (finfo->info, h->root.root.string, h->root.u.undef.abfd,
- + (asection *) NULL, (bfd_vma) 0, true)))
- + {
- + eoinfo->failed = true;
- + return false;
- + }
- + }
- +
- + /* We don't want to output symbols that have never been mentioned by
- + a regular file, or that we have been told to strip. However, if
- + h->indx is set to -2, the symbol is used by a reloc and we must
- + output it. */
- + if (h->indx == -2)
- + strip = false;
- + else if (((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- + || (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0)
- + && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
- + && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0)
- + strip = true;
- + else if (finfo->info->strip == strip_all
- + || (finfo->info->strip == strip_some
- + && bfd_hash_lookup (finfo->info->keep_hash,
- + h->root.root.string,
- + false, false) == NULL))
- + strip = true;
- + else
- + strip = false;
- +
- + /* If we're stripping it, and it's not a dynamic symbol, there's
- + nothing else to do unless it is a forced local symbol. */
- + if (strip
- + && h->dynindx == -1
- + && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
- + return true;
- +
- + sym.st_value = 0;
- + sym.st_size = h->size;
- + sym.st_other = h->other;
- + if ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0)
- + sym.st_info = ELF_ST_INFO (STB_LOCAL, h->type);
- + else if (h->root.type == bfd_link_hash_undefweak
- + || h->root.type == bfd_link_hash_defweak)
- + sym.st_info = ELF_ST_INFO (STB_WEAK, h->type);
- + else
- + sym.st_info = ELF_ST_INFO (STB_GLOBAL, h->type);
- +
- + switch (h->root.type)
- + {
- + default:
- + case bfd_link_hash_new:
- + case bfd_link_hash_warning:
- + abort ();
- + return false;
- +
- + case bfd_link_hash_undefined:
- + case bfd_link_hash_undefweak:
- + input_sec = bfd_und_section_ptr;
- + sym.st_shndx = SHN_UNDEF;
- + break;
- +
- + case bfd_link_hash_defined:
- + case bfd_link_hash_defweak:
- + {
- + input_sec = h->root.u.def.section;
- + if (input_sec->output_section != NULL)
- + {
- + sym.st_shndx =
- + _bfd_elf_section_from_bfd_section (finfo->output_bfd,
- + input_sec->output_section);
- + if (sym.st_shndx == SHN_BAD)
- + {
- + (*_bfd_error_handler)
- + (_("%s: could not find output section %s for input section %s"),
- + bfd_get_filename (finfo->output_bfd),
- + input_sec->output_section->name,
- + input_sec->name);
- + eoinfo->failed = true;
- + return false;
- + }
- +
- + /* ELF symbols in relocateable files are section relative,
- + but in nonrelocateable files they are virtual
- + addresses. */
- + sym.st_value = h->root.u.def.value + input_sec->output_offset;
- +#if 0
- + if (! finfo->info->relocateable)
- + {
- + sym.st_value += input_sec->output_section->vma;
- + if (h->type == STT_TLS)
- + {
- + /* STT_TLS symbols are relative to PT_TLS segment
- + base. */
- + BFD_ASSERT (finfo->first_tls_sec != NULL);
- + sym.st_value -= finfo->first_tls_sec->vma;
- + }
- + }
- +#endif
- + }
- + else
- + {
- + BFD_ASSERT (input_sec->owner == NULL
- + || (input_sec->owner->flags & DYNAMIC) != 0);
- + sym.st_shndx = SHN_UNDEF;
- + input_sec = bfd_und_section_ptr;
- + }
- + }
- + break;
- +
- + case bfd_link_hash_common:
- + input_sec = h->root.u.c.p->section;
- + sym.st_shndx = SHN_COMMON;
- + sym.st_value = 1 << h->root.u.c.p->alignment_power;
- + break;
- +
- + case bfd_link_hash_indirect:
- + /* These symbols are created by symbol versioning. They point
- + to the decorated version of the name. For example, if the
- + symbol foo@@GNU_1.2 is the default, which should be used when
- + foo is used with no version, then we add an indirect symbol
- + foo which points to foo@@GNU_1.2. We ignore these symbols,
- + since the indirected symbol is already in the hash table. */
- + return true;
- + }
- +
- + /* Give the processor backend a chance to tweak the symbol value,
- + and also to finish up anything that needs to be done for this
- + symbol. FIXME: Not calling elf_backend_finish_dynamic_symbol for
- + forced local syms when non-shared is due to a historical quirk. */
- + if ((h->dynindx != -1
- + || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0)
- + && (finfo->info->shared
- + || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
- + && elf_hash_table (finfo->info)->dynamic_sections_created)
- + {
- + struct elf_backend_data *bed;
- +
- + bed = get_elf_backend_data (finfo->output_bfd);
- + if (! ((*bed->elf_backend_finish_dynamic_symbol)
- + (finfo->output_bfd, finfo->info, h, &sym)))
- + {
- + eoinfo->failed = true;
- + return false;
- + }
- + }
- +
- + /* If we are marking the symbol as undefined, and there are no
- + non-weak references to this symbol from a regular object, then
- + mark the symbol as weak undefined; if there are non-weak
- + references, mark the symbol as strong. We can't do this earlier,
- + because it might not be marked as undefined until the
- + finish_dynamic_symbol routine gets through with it. */
- + if (sym.st_shndx == SHN_UNDEF
- + && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) != 0
- + && (ELF_ST_BIND (sym.st_info) == STB_GLOBAL
- + || ELF_ST_BIND (sym.st_info) == STB_WEAK))
- + {
- + int bindtype;
- +
- + if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK) != 0)
- + bindtype = STB_GLOBAL;
- + else
- + bindtype = STB_WEAK;
- + sym.st_info = ELF_ST_INFO (bindtype, ELF_ST_TYPE (sym.st_info));
- + }
- +
- + /* If a symbol is not defined locally, we clear the visibility
- + field. */
- + if (! finfo->info->relocateable
- + && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- + sym.st_other ^= ELF_ST_VISIBILITY (sym.st_other);
- +
- + /* If this symbol should be put in the .dynsym section, then put it
- + there now. We already know the symbol index. We also fill in
- + the entry in the .hash section. */
- + if (h->dynindx != -1
- + && elf_hash_table (finfo->info)->dynamic_sections_created)
- + {
- + size_t bucketcount;
- + size_t bucket;
- + size_t hash_entry_size;
- + bfd_byte *bucketpos;
- + bfd_vma chain;
- + Elf_External_Sym *esym;
- +
- + sym.st_name = h->dynstr_index;
- + esym = (Elf_External_Sym *) finfo->dynsym_sec->contents + h->dynindx;
- + elf_swap_symbol_out (finfo->output_bfd, &sym, (PTR) esym, (PTR) 0);
- +
- + bucketcount = elf_hash_table (finfo->info)->bucketcount;
- + bucket = h->elf_hash_value % bucketcount;
- + hash_entry_size
- + = elf_section_data (finfo->hash_sec)->this_hdr.sh_entsize;
- + bucketpos = ((bfd_byte *) finfo->hash_sec->contents
- + + (bucket + 2) * hash_entry_size);
- + chain = bfd_get (8 * hash_entry_size, finfo->output_bfd, bucketpos);
- + bfd_put (8 * hash_entry_size, finfo->output_bfd, (bfd_vma) h->dynindx,
- + bucketpos);
- + bfd_put (8 * hash_entry_size, finfo->output_bfd, chain,
- + ((bfd_byte *) finfo->hash_sec->contents
- + + (bucketcount + 2 + h->dynindx) * hash_entry_size));
- +
- + if (finfo->symver_sec != NULL && finfo->symver_sec->contents != NULL)
- + {
- + Elf_Internal_Versym iversym;
- + Elf_External_Versym *eversym;
- +
- + if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- + {
- + if (h->verinfo.verdef == NULL)
- + iversym.vs_vers = 0;
- + else
- + iversym.vs_vers = h->verinfo.verdef->vd_exp_refno + 1;
- + }
- + else
- + {
- + if (h->verinfo.vertree == NULL)
- + iversym.vs_vers = 1;
- + else
- + iversym.vs_vers = h->verinfo.vertree->vernum + 1;
- + }
- +
- + if ((h->elf_link_hash_flags & ELF_LINK_HIDDEN) != 0)
- + iversym.vs_vers |= VERSYM_HIDDEN;
- +
- + eversym = (Elf_External_Versym *) finfo->symver_sec->contents;
- + eversym += h->dynindx;
- + _bfd_elf_swap_versym_out (finfo->output_bfd, &iversym, eversym);
- + }
- + }
- +
- + /* If we're stripping it, then it was just a dynamic symbol, and
- + there's nothing else to do. */
- + if (strip || (input_sec->flags & SEC_EXCLUDE) != 0)
- + return true;
- +
- + h->indx = bfd_get_symcount (finfo->output_bfd);
- +
- + if (! elf_link_output_sym (finfo, h->root.root.string, &sym, input_sec))
- + {
- + eoinfo->failed = true;
- + return false;
- + }
- +
- + return true;
- +}
- +
- +/* Copy the relocations indicated by the INTERNAL_RELOCS (which
- + originated from the section given by INPUT_REL_HDR) to the
- + OUTPUT_BFD. */
- +
- +static boolean
- +elf_link_output_relocs (output_bfd, input_section, input_rel_hdr,
- + internal_relocs)
- + bfd *output_bfd;
- + asection *input_section;
- + Elf_Internal_Shdr *input_rel_hdr;
- + Elf_Internal_Rela *internal_relocs;
- +{
- + Elf_Internal_Rela *irela;
- + Elf_Internal_Rela *irelaend;
- + Elf_Internal_Shdr *output_rel_hdr;
- + asection *output_section;
- + unsigned int *rel_countp = NULL;
- + struct elf_backend_data *bed;
- + bfd_size_type amt;
- +
- + output_section = input_section->output_section;
- + output_rel_hdr = NULL;
- +
- + if (elf_section_data (output_section)->rel_hdr.sh_entsize
- + == input_rel_hdr->sh_entsize)
- + {
- + output_rel_hdr = &elf_section_data (output_section)->rel_hdr;
- + rel_countp = &elf_section_data (output_section)->rel_count;
- + }
- + else if (elf_section_data (output_section)->rel_hdr2
- + && (elf_section_data (output_section)->rel_hdr2->sh_entsize
- + == input_rel_hdr->sh_entsize))
- + {
- + output_rel_hdr = elf_section_data (output_section)->rel_hdr2;
- + rel_countp = &elf_section_data (output_section)->rel_count2;
- + }
- + else
- + {
- + (*_bfd_error_handler)
- + (_("%s: relocation size mismatch in %s section %s"),
- + bfd_get_filename (output_bfd),
- + bfd_archive_filename (input_section->owner),
- + input_section->name);
- + bfd_set_error (bfd_error_wrong_object_format);
- + return false;
- + }
- +
- + bed = get_elf_backend_data (output_bfd);
- + irela = internal_relocs;
- + irelaend = irela + (NUM_SHDR_ENTRIES (input_rel_hdr)
- + * bed->s->int_rels_per_ext_rel);
- +
- + if (input_rel_hdr->sh_entsize == sizeof (Elf_External_Rel))
- + {
- + Elf_External_Rel *erel;
- + Elf_Internal_Rel *irel;
- +
- + amt = bed->s->int_rels_per_ext_rel * sizeof (Elf_Internal_Rel);
- + irel = (Elf_Internal_Rel *) bfd_zmalloc (amt);
- + if (irel == NULL)
- + {
- + (*_bfd_error_handler) (_("Error: out of memory"));
- + abort ();
- + }
- +
- + erel = ((Elf_External_Rel *) output_rel_hdr->contents + *rel_countp);
- + for (; irela < irelaend; irela += bed->s->int_rels_per_ext_rel, erel++)
- + {
- + unsigned int i;
- +
- + for (i = 0; i < bed->s->int_rels_per_ext_rel; i++)
- + {
- + irel[i].r_offset = irela[i].r_offset;
- + irel[i].r_info = irela[i].r_info;
- + BFD_ASSERT (irela[i].r_addend == 0);
- + }
- +
- + if (bed->s->swap_reloc_out)
- + (*bed->s->swap_reloc_out) (output_bfd, irel, (PTR) erel);
- + else
- + elf_swap_reloc_out (output_bfd, irel, erel);
- + }
- +
- + free (irel);
- + }
- + else
- + {
- + Elf_External_Rela *erela;
- +
- + BFD_ASSERT (input_rel_hdr->sh_entsize == sizeof (Elf_External_Rela));
- +
- + erela = ((Elf_External_Rela *) output_rel_hdr->contents + *rel_countp);
- + for (; irela < irelaend; irela += bed->s->int_rels_per_ext_rel, erela++)
- + if (bed->s->swap_reloca_out)
- + (*bed->s->swap_reloca_out) (output_bfd, irela, (PTR) erela);
- + else
- + elf_swap_reloca_out (output_bfd, irela, erela);
- + }
- +
- + /* Bump the counter, so that we know where to add the next set of
- + relocations. */
- + *rel_countp += NUM_SHDR_ENTRIES (input_rel_hdr);
- +
- + return true;
- +}
- +
- +/* Link an input file into the linker output file. This function
- + handles all the sections and relocations of the input file at once.
- + This is so that we only have to read the local symbols once, and
- + don't have to keep them in memory. */
- +
- +static boolean
- +elf_link_input_bfd (finfo, input_bfd)
- + struct elf_final_link_info *finfo;
- + bfd *input_bfd;
- +{
- + boolean (*relocate_section) PARAMS ((bfd *, struct bfd_link_info *,
- + bfd *, asection *, bfd_byte *,
- + Elf_Internal_Rela *,
- + Elf_Internal_Sym *, asection **));
- + bfd *output_bfd;
- + Elf_Internal_Shdr *symtab_hdr;
- + size_t locsymcount;
- + size_t extsymoff;
- + Elf_Internal_Sym *isymbuf;
- + Elf_Internal_Sym *isym;
- + Elf_Internal_Sym *isymend;
- + long *pindex;
- + asection **ppsection;
- + asection *o;
- + struct elf_backend_data *bed;
- + boolean emit_relocs;
- + struct elf_link_hash_entry **sym_hashes;
- +
- + output_bfd = finfo->output_bfd;
- + bed = get_elf_backend_data (output_bfd);
- + relocate_section = bed->elf_backend_relocate_section;
- +
- + /* If this is a dynamic object, we don't want to do anything here:
- + we don't want the local symbols, and we don't want the section
- + contents. */
- + if ((input_bfd->flags & DYNAMIC) != 0)
- + return true;
- +
- + emit_relocs = (finfo->info->relocateable
- + || finfo->info->emitrelocations
- + || bed->elf_backend_emit_relocs);
- +
- + symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
- + if (elf_bad_symtab (input_bfd))
- + {
- + locsymcount = symtab_hdr->sh_size / sizeof (Elf_External_Sym);
- + extsymoff = 0;
- + }
- + else
- + {
- + locsymcount = symtab_hdr->sh_info;
- + extsymoff = symtab_hdr->sh_info;
- + }
- +
- + /* Read the local symbols. */
- + isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
- + if (isymbuf == NULL && locsymcount != 0)
- + {
- + isymbuf = bfd_elf_get_elf_syms (input_bfd, symtab_hdr, locsymcount, 0,
- + finfo->internal_syms,
- + finfo->external_syms,
- + finfo->locsym_shndx);
- + if (isymbuf == NULL)
- + return false;
- + }
- +
- + /* Find local symbol sections and adjust values of symbols in
- + SEC_MERGE sections. Write out those local symbols we know are
- + going into the output file. */
- + isymend = isymbuf + locsymcount;
- + for (isym = isymbuf, pindex = finfo->indices, ppsection = finfo->sections;
- + isym < isymend;
- + isym++, pindex++, ppsection++)
- + {
- + asection *isec;
- + const char *name;
- + Elf_Internal_Sym osym;
- +
- + *pindex = -1;
- +
- + if (elf_bad_symtab (input_bfd))
- + {
- + if (ELF_ST_BIND (isym->st_info) != STB_LOCAL)
- + {
- + *ppsection = NULL;
- + continue;
- + }
- + }
- +
- + if (isym->st_shndx == SHN_UNDEF)
- + isec = bfd_und_section_ptr;
- + else if (isym->st_shndx < SHN_LORESERVE
- + || isym->st_shndx > SHN_HIRESERVE)
- + {
- + isec = section_from_elf_index (input_bfd, isym->st_shndx);
- + if (isec
- + && elf_section_data (isec)->sec_info_type == ELF_INFO_TYPE_MERGE
- + && ELF_ST_TYPE (isym->st_info) != STT_SECTION)
- + isym->st_value =
- + _bfd_merged_section_offset (output_bfd, &isec,
- + elf_section_data (isec)->sec_info,
- + isym->st_value, (bfd_vma) 0);
- + }
- + else if (isym->st_shndx == SHN_ABS)
- + isec = bfd_abs_section_ptr;
- + else if (isym->st_shndx == SHN_COMMON)
- + isec = bfd_com_section_ptr;
- + else
- + {
- + /* Who knows? */
- + isec = NULL;
- + }
- +
- + *ppsection = isec;
- +
- + /* Don't output the first, undefined, symbol. */
- + if (ppsection == finfo->sections)
- + continue;
- +
- + if (ELF_ST_TYPE (isym->st_info) == STT_SECTION)
- + {
- + /* We never output section symbols. Instead, we use the
- + section symbol of the corresponding section in the output
- + file. */
- + continue;
- + }
- +
- + /* If we are stripping all symbols, we don't want to output this
- + one. */
- + if (finfo->info->strip == strip_all)
- + continue;
- +
- + /* If we are discarding all local symbols, we don't want to
- + output this one. If we are generating a relocateable output
- + file, then some of the local symbols may be required by
- + relocs; we output them below as we discover that they are
- + needed. */
- + if (finfo->info->discard == discard_all)
- + continue;
- +
- + /* If this symbol is defined in a section which we are
- + discarding, we don't need to keep it, but note that
- + linker_mark is only reliable for sections that have contents.
- + For the benefit of the MIPS ELF linker, we check SEC_EXCLUDE
- + as well as linker_mark. */
- + if ((isym->st_shndx < SHN_LORESERVE || isym->st_shndx > SHN_HIRESERVE)
- + && isec != NULL
- + && ((! isec->linker_mark && (isec->flags & SEC_HAS_CONTENTS) != 0)
- + || (! finfo->info->relocateable
- + && (isec->flags & SEC_EXCLUDE) != 0)))
- + continue;
- +
- + /* Get the name of the symbol. */
- + name = bfd_elf_string_from_elf_section (input_bfd, symtab_hdr->sh_link,
- + isym->st_name);
- + if (name == NULL)
- + return false;
- +
- + /* See if we are discarding symbols with this name. */
- + if ((finfo->info->strip == strip_some
- + && (bfd_hash_lookup (finfo->info->keep_hash, name, false, false)
- +